Mercurial > repos > other > Puppet
annotate modules/mysql/manifests/bindings.pp @ 389:668df4711671
Update MySQL modules
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Mon, 03 Jan 2022 17:16:21 +0000 |
parents | 48d3a1948e4d |
children | c6c9a2cfcfbd |
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 | |
28 # Whether the package should be present, absent, or a specific version. Valid values are 'present', 'absent', or 'x.y.z'. Only applies if `java_enable => true`. | |
29 # @param java_package_name | |
30 # The name of the Java package to install. Only applies if `java_enable => true`. | |
31 # @param java_package_provider | |
32 # The provider to use to install the Java package. Only applies if `java_enable => true`. | |
33 # @param perl_package_ensure | |
34 # Whether the package should be present, absent, or a specific version. Valid values are 'present', 'absent', or 'x.y.z'. Only applies if `perl_enable => true`. | |
35 # @param perl_package_name | |
36 # The name of the Perl package to install. Only applies if `perl_enable => true`. | |
37 # @param perl_package_provider | |
38 # The provider to use to install the Perl package. Only applies if `perl_enable => true`. | |
39 # @param php_package_ensure | |
40 # Whether the package should be present, absent, or a specific version. Valid values are 'present', 'absent', or 'x.y.z'. Only applies if `php_enable => true`. | |
41 # @param php_package_name | |
42 # The name of the PHP package to install. Only applies if `php_enable => true`. | |
43 # @param php_package_provider | |
44 # The provider to use to install the PHP package. Only applies if `php_enable => true`. | |
45 # @param python_package_ensure | |
46 # Whether the package should be present, absent, or a specific version. Valid values are 'present', 'absent', or 'x.y.z'. Only applies if `python_enable => true`. | |
47 # @param python_package_name | |
48 # The name of the Python package to install. Only applies if `python_enable => true`. | |
49 # @param python_package_provider | |
50 # The provider to use to install the Python package. Only applies if `python_enable => true`. | |
51 # @param ruby_package_ensure | |
52 # Whether the package should be present, absent, or a specific version. Valid values are 'present', 'absent', or 'x.y.z'. Only applies if `ruby_enable => true`. | |
53 # @param ruby_package_name | |
54 # The name of the Ruby package to install. Only applies if `ruby_enable => true`. | |
55 # @param ruby_package_provider | |
56 # What provider should be used to install the package. | |
57 # @param client_dev_package_ensure | |
58 # Whether the package should be present, absent, or a specific version. Valid values are 'present', 'absent', or 'x.y.z'. Only applies if `client_dev => true`. | |
59 # @param client_dev_package_name | |
60 # The name of the client_dev package to install. Only applies if `client_dev => true`. | |
61 # @param client_dev_package_provider | |
62 # The provider to use to install the client_dev package. Only applies if `client_dev => true`. | |
63 # @param daemon_dev_package_ensure | |
64 # Whether the package should be present, absent, or a specific version. Valid values are 'present', 'absent', or 'x.y.z'. Only applies if `daemon_dev => true`. | |
65 # @param daemon_dev_package_name | |
66 # The name of the daemon_dev package to install. Only applies if `daemon_dev => true`. | |
67 # @param daemon_dev_package_provider | |
68 # The provider to use to install the daemon_dev package. Only applies if `daemon_dev => true`. | |
69 # | |
0
956e484adc12
Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
70 class mysql::bindings ( |
26
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
71 $install_options = undef, |
0
956e484adc12
Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
72 # Boolean to determine if we should include the classes. |
26
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
73 $java_enable = false, |
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
74 $perl_enable = false, |
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
75 $php_enable = false, |
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
76 $python_enable = false, |
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
77 $ruby_enable = false, |
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
78 $client_dev = false, |
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
79 $daemon_dev = false, |
0
956e484adc12
Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
80 # Settings for the various classes. |
26
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
81 $java_package_ensure = $mysql::params::java_package_ensure, |
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
82 $java_package_name = $mysql::params::java_package_name, |
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
83 $java_package_provider = $mysql::params::java_package_provider, |
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
84 $perl_package_ensure = $mysql::params::perl_package_ensure, |
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
85 $perl_package_name = $mysql::params::perl_package_name, |
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
86 $perl_package_provider = $mysql::params::perl_package_provider, |
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
87 $php_package_ensure = $mysql::params::php_package_ensure, |
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
88 $php_package_name = $mysql::params::php_package_name, |
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
89 $php_package_provider = $mysql::params::php_package_provider, |
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
90 $python_package_ensure = $mysql::params::python_package_ensure, |
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
91 $python_package_name = $mysql::params::python_package_name, |
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
92 $python_package_provider = $mysql::params::python_package_provider, |
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
93 $ruby_package_ensure = $mysql::params::ruby_package_ensure, |
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
94 $ruby_package_name = $mysql::params::ruby_package_name, |
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
95 $ruby_package_provider = $mysql::params::ruby_package_provider, |
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
96 $client_dev_package_ensure = $mysql::params::client_dev_package_ensure, |
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
97 $client_dev_package_name = $mysql::params::client_dev_package_name, |
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
98 $client_dev_package_provider = $mysql::params::client_dev_package_provider, |
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
99 $daemon_dev_package_ensure = $mysql::params::daemon_dev_package_ensure, |
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
100 $daemon_dev_package_name = $mysql::params::daemon_dev_package_name, |
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
101 $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
|
102 ) inherits mysql::params { |
26
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
103 case $::osfamily { |
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
104 'Archlinux': { |
389 | 105 if $java_enable { fail("::mysql::bindings::java cannot be managed by puppet on ${::facts['os']['family']} |
106 as it is not in official repositories. Please disable java mysql binding.") } | |
107 if $perl_enable { include 'mysql::bindings::perl' } | |
108 if $php_enable { warning("::mysql::bindings::php does not need to be managed by puppet on ${::facts['os']['family']} | |
109 as it is included in mysql package by default.") } | |
110 if $python_enable { include 'mysql::bindings::python' } | |
111 if $ruby_enable { fail("::mysql::bindings::ruby cannot be managed by puppet on %{::facts['os']['family']} | |
112 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
|
113 } |
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
114 |
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
115 default: { |
389 | 116 if $java_enable { include 'mysql::bindings::java' } |
117 if $perl_enable { include 'mysql::bindings::perl' } | |
118 if $php_enable { include 'mysql::bindings::php' } | |
119 if $python_enable { include 'mysql::bindings::python' } | |
120 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
|
121 } |
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
122 } |
58d1818c2ded
Update MySQL module (which adds "staging" module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
123 |
389 | 124 if $client_dev { include 'mysql::bindings::client_dev' } |
125 if $daemon_dev { include 'mysql::bindings::daemon_dev' } | |
0
956e484adc12
Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
126 } |