Mercurial > repos > other > Puppet
annotate modules/mysql/manifests/bindings.pp @ 443:c6c9a2cfcfbd
Update MySQL module
Fixes a problem with MariaDB and blank certificate paths
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Mon, 08 May 2023 11:48:41 +0100 |
parents | 668df4711671 |
children |
rev | line source |
---|---|
244 | 1 # @summary |
2 # Parent class for MySQL bindings. | |
3 # | |
4 # @example Install Ruby language bindings | |
5 # class { 'mysql::bindings': | |
6 # ruby_enable => true, | |
7 # ruby_package_ensure => 'present', | |
8 # ruby_package_name => 'ruby-mysql-2.7.1-1mdv2007.0.sparc.rpm', | |
9 # ruby_package_provider => 'rpm', | |
10 # } | |
11 # @param install_options | |
12 # Passes `install_options` array to managed package resources. You must pass the [appropriate options](https://docs.puppetlabs.com/references/latest/type.html#package-attribute-install_options) for the package manager(s). | |
13 # @param java_enable | |
14 # Specifies whether `::mysql::bindings::java` should be included. Valid values are `true`, `false`. | |
15 # @param perl_enable | |
16 # Specifies whether `mysql::bindings::perl` should be included. Valid values are `true`, `false`. | |
17 # @param php_enable | |
18 # Specifies whether `mysql::bindings::php` should be included. Valid values are `true`, `false`. | |
19 # @param python_enable | |
20 # Specifies whether `mysql::bindings::python` should be included. Valid values are `true`, `false`. | |
21 # @param ruby_enable | |
22 # Specifies whether `mysql::bindings::ruby` should be included. Valid values are `true`, `false`. | |
23 # @param client_dev | |
24 # Specifies whether `::mysql::bindings::client_dev` should be included. Valid values are `true`', `false`. | |
25 # @param daemon_dev | |
26 # Specifies whether `::mysql::bindings::daemon_dev` should be included. Valid values are `true`, `false`. | |
27 # @param java_package_ensure | |
443 | 28 # Whether the package should be present, absent, or a specific version. Valid values are 'present', 'absent', or 'x.y.z'. |
29 # Only applies if `java_enable => true`. | |
244 | 30 # @param java_package_name |
31 # The name of the Java package to install. Only applies if `java_enable => true`. | |
32 # @param java_package_provider | |
33 # The provider to use to install the Java package. Only applies if `java_enable => true`. | |
34 # @param perl_package_ensure | |
443 | 35 # Whether the package should be present, absent, or a specific version. Valid values are 'present', 'absent', or 'x.y.z'. |
36 # Only applies if `perl_enable => true`. | |
244 | 37 # @param perl_package_name |
38 # The name of the Perl package to install. Only applies if `perl_enable => true`. | |
39 # @param perl_package_provider | |
40 # The provider to use to install the Perl package. Only applies if `perl_enable => true`. | |
41 # @param php_package_ensure | |
443 | 42 # Whether the package should be present, absent, or a specific version. Valid values are 'present', 'absent', or 'x.y.z'. |
43 # Only applies if `php_enable => true`. | |
244 | 44 # @param php_package_name |
45 # The name of the PHP package to install. Only applies if `php_enable => true`. | |
46 # @param php_package_provider | |
47 # The provider to use to install the PHP package. Only applies if `php_enable => true`. | |
48 # @param python_package_ensure | |
443 | 49 # Whether the package should be present, absent, or a specific version. Valid values are 'present', 'absent', or 'x.y.z'. |
50 # Only applies if `python_enable => true`. | |
244 | 51 # @param python_package_name |
52 # The name of the Python package to install. Only applies if `python_enable => true`. | |
53 # @param python_package_provider | |
54 # The provider to use to install the Python package. Only applies if `python_enable => true`. | |
55 # @param ruby_package_ensure | |
443 | 56 # Whether the package should be present, absent, or a specific version. Valid values are 'present', 'absent', or 'x.y.z'. |
57 # Only applies if `ruby_enable => true`. | |
244 | 58 # @param ruby_package_name |
59 # The name of the Ruby package to install. Only applies if `ruby_enable => true`. | |
60 # @param ruby_package_provider | |
61 # What provider should be used to install the package. | |
62 # @param client_dev_package_ensure | |
443 | 63 # Whether the package should be present, absent, or a specific version. Valid values are 'present', 'absent', or 'x.y.z'. |
64 # Only applies if `client_dev => true`. | |
244 | 65 # @param client_dev_package_name |
66 # The name of the client_dev package to install. Only applies if `client_dev => true`. | |
67 # @param client_dev_package_provider | |
68 # The provider to use to install the client_dev package. Only applies if `client_dev => true`. | |
69 # @param daemon_dev_package_ensure | |
443 | 70 # Whether the package should be present, absent, or a specific version. Valid values are 'present', 'absent', or 'x.y.z'. |
71 # Only applies if `daemon_dev => true`. | |
244 | 72 # @param daemon_dev_package_name |
73 # The name of the daemon_dev package to install. Only applies if `daemon_dev => true`. | |
74 # @param daemon_dev_package_provider | |
75 # The provider to use to install the daemon_dev package. Only applies if `daemon_dev => true`. | |
76 # | |
0
956e484adc12
Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
77 class mysql::bindings ( |
443 | 78 Optional[Array[String[1]]] $install_options = undef, |
0
956e484adc12
Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
79 # Boolean to determine if we should include the classes. |
443 | 80 Boolean $java_enable = false, |
81 Boolean $perl_enable = false, | |
82 Boolean $php_enable = false, | |
83 Boolean $python_enable = false, | |
84 Boolean $ruby_enable = false, | |
85 Boolean $client_dev = false, | |
86 Boolean $daemon_dev = false, | |
0
956e484adc12
Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
87 # Settings for the various classes. |
443 | 88 Variant[Enum['present','absent'], Pattern[/(\d+)[\.](\d+)[\.](\d+)/]] $java_package_ensure = $mysql::params::java_package_ensure, |
89 String[1] $java_package_name = $mysql::params::java_package_name, | |
90 Optional[String[1]] $java_package_provider = $mysql::params::java_package_provider, | |
91 Variant[Enum['present','absent'], Pattern[/(\d+)[\.](\d+)[\.](\d+)/]] $perl_package_ensure = $mysql::params::perl_package_ensure, | |
92 String[1] $perl_package_name = $mysql::params::perl_package_name, | |
93 Optional[String[1]] $perl_package_provider = $mysql::params::perl_package_provider, | |
94 Variant[Enum['present','absent'], Pattern[/(\d+)[\.](\d+)[\.](\d+)/]] $php_package_ensure = $mysql::params::php_package_ensure, | |
95 String[1] $php_package_name = $mysql::params::php_package_name, | |
96 Optional[String[1]] $php_package_provider = $mysql::params::php_package_provider, | |
97 Variant[Enum['present','absent'], Pattern[/(\d+)[\.](\d+)[\.](\d+)/]] $python_package_ensure = $mysql::params::python_package_ensure, | |
98 String[1] $python_package_name = $mysql::params::python_package_name, | |
99 Optional[String[1]] $python_package_provider = $mysql::params::python_package_provider, | |
100 Variant[Enum['present','absent'], Pattern[/(\d+)[\.](\d+)[\.](\d+)/]] $ruby_package_ensure = $mysql::params::ruby_package_ensure, | |
101 String[1] $ruby_package_name = $mysql::params::ruby_package_name, | |
102 Optional[String[1]] $ruby_package_provider = $mysql::params::ruby_package_provider, | |
103 Variant[Enum['present','absent'], Pattern[/(\d+)[\.](\d+)[\.](\d+)/]] $client_dev_package_ensure = $mysql::params::client_dev_package_ensure, | |
104 Optional[String[1]] $client_dev_package_name = $mysql::params::client_dev_package_name, | |
105 Optional[String[1]] $client_dev_package_provider = $mysql::params::client_dev_package_provider, | |
106 Variant[Enum['present','absent'], Pattern[/(\d+)[\.](\d+)[\.](\d+)/]] $daemon_dev_package_ensure = $mysql::params::daemon_dev_package_ensure, | |
107 String[1] $daemon_dev_package_name = $mysql::params::daemon_dev_package_name, | |
108 Optional[String[1]] $daemon_dev_package_provider = $mysql::params::daemon_dev_package_provider | |
0
956e484adc12
Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
109 ) inherits mysql::params { |
443 | 110 case $facts['os']['family'] { |
26
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
111 'Archlinux': { |
443 | 112 if $java_enable { fail("::mysql::bindings::java cannot be managed by puppet on ${facts['os']['family']} as it is not in official repositories. Please disable java mysql binding.") } |
389 | 113 if $perl_enable { include 'mysql::bindings::perl' } |
443 | 114 if $php_enable { warning("::mysql::bindings::php does not need to be managed by puppet on ${facts['os']['family']} as it is included in mysql package by default.") } |
389 | 115 if $python_enable { include 'mysql::bindings::python' } |
443 | 116 if $ruby_enable { fail("::mysql::bindings::ruby cannot be managed by puppet on ${facts['os']['family']} as it is not in official repositories. Please disable ruby mysql binding.") } |
26
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
117 } |
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
118 |
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
119 default: { |
389 | 120 if $java_enable { include 'mysql::bindings::java' } |
121 if $perl_enable { include 'mysql::bindings::perl' } | |
122 if $php_enable { include 'mysql::bindings::php' } | |
123 if $python_enable { include 'mysql::bindings::python' } | |
124 if $ruby_enable { include 'mysql::bindings::ruby' } | |
26
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
125 } |
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
126 } |
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
127 |
389 | 128 if $client_dev { include 'mysql::bindings::client_dev' } |
129 if $daemon_dev { include 'mysql::bindings::daemon_dev' } | |
0
956e484adc12
Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
130 } |