File tree 13 files changed +136
-38
lines changed
13 files changed +136
-38
lines changed Original file line number Diff line number Diff line change @@ -178,6 +178,9 @@ Whether the MySQL configuration file should be managed.
178
178
#####` includedir `
179
179
The location of !includedir for custom configuration overrides.
180
180
181
+ #####` install_options `
182
+ Pass install_options array to managed package resources. You must be sure to pass the appropriate options for the correct package manager.
183
+
181
184
#####` purge_conf_dir `
182
185
183
186
Whether the ` includedir ` directory should be purged.
@@ -346,6 +349,9 @@ The hostname to allow to access the MySQL monitoring user.
346
349
347
350
####mysql::bindings
348
351
352
+ #####` install_options `
353
+ Pass install_options array to managed package resources. You must be sure to pass the appropriate options for the correct package manager.
354
+
349
355
#####` java_enable `
350
356
351
357
Boolean to decide if the Java bindings should be installed.
@@ -420,6 +426,9 @@ What provider should be used to install the package.
420
426
421
427
Boolean to automatically install all bindings.
422
428
429
+ #####` install_options `
430
+ Pass install_options array to managed package resources. You must be sure to pass the appropriate options for the correct package manager.
431
+
423
432
#####` package_ensure `
424
433
425
434
What to set the package to. Can be 'present', 'absent', or 'x.y.z'.
Original file line number Diff line number Diff line change 1
1
# See README.md.
2
2
class mysql::bindings (
3
+ $install_options = undef ,
3
4
# Boolean to determine if we should include the classes.
4
5
$java_enable = false ,
5
6
$perl_enable = false ,
Original file line number Diff line number Diff line change 2
2
class mysql::bindings::client_dev {
3
3
4
4
if $mysql::bindings::client_dev_package_name {
5
- package { 'mysql-client_dev' :
6
- ensure => $mysql::bindings::client_dev_package_ensure ,
7
- name => $mysql::bindings::client_dev_package_name ,
8
- provider => $mysql::bindings::client_dev_package_provider ,
5
+ if $mysql::bindings::install_options == undef {
6
+ package { 'mysql-client_dev' :
7
+ ensure => $mysql::bindings::client_dev_package_ensure ,
8
+ name => $mysql::bindings::client_dev_package_name ,
9
+ provider => $mysql::bindings::client_dev_package_provider ,
10
+ }
11
+ } else {
12
+ validate_array($mysql::bindings::install_options )
13
+ package { 'mysql-client_dev' :
14
+ ensure => $mysql::bindings::client_dev_package_ensure ,
15
+ install_options => $mysql::bindings::install_options ,
16
+ name => $mysql::bindings::client_dev_package_name ,
17
+ provider => $mysql::bindings::client_dev_package_provider ,
18
+ }
9
19
}
10
20
} else {
11
21
warning (" No MySQL client development package configured for ${::operatingsystem} ." )
12
22
}
13
23
14
- }
24
+ }
Original file line number Diff line number Diff line change 2
2
class mysql::bindings::daemon_dev {
3
3
4
4
if $mysql::bindings::daemon_dev_package_name {
5
- package { 'mysql-daemon_dev' :
6
- ensure => $mysql::bindings::daemon_dev_package_ensure ,
7
- name => $mysql::bindings::daemon_dev_package_name ,
8
- provider => $mysql::bindings::daemon_dev_package_provider ,
5
+ if $mysql::bindings::install_options == undef {
6
+ package { 'mysql-daemon_dev' :
7
+ ensure => $mysql::bindings::daemon_dev_package_ensure ,
8
+ name => $mysql::bindings::daemon_dev_package_name ,
9
+ provider => $mysql::bindings::daemon_dev_package_provider ,
10
+ }
11
+ } else {
12
+ validate_array($mysql::bindings::install_options )
13
+ package { 'mysql-daemon_dev' :
14
+ ensure => $mysql::bindings::daemon_dev_package_ensure ,
15
+ install_options => $mysql::bindings::install_options ,
16
+ name => $mysql::bindings::daemon_dev_package_name ,
17
+ provider => $mysql::bindings::daemon_dev_package_provider ,
18
+ }
9
19
}
10
20
} else {
11
21
warning (" No MySQL daemon development package configured for ${::operatingsystem} ." )
12
22
}
13
23
14
- }
24
+ }
Original file line number Diff line number Diff line change 1
1
# Private class
2
2
class mysql::bindings::java {
3
3
4
- package { 'mysql-connector-java' :
5
- ensure => $mysql::bindings::java_package_ensure ,
6
- name => $mysql::bindings::java_package_name ,
7
- provider => $mysql::bindings::java_package_provider ,
8
- }
4
+ if $mysql::bindings::install_options == undef {
5
+ package { 'mysql-connector-java' :
6
+ ensure => $mysql::bindings::java_package_ensure ,
7
+ name => $mysql::bindings::java_package_name ,
8
+ provider => $mysql::bindings::java_package_provider ,
9
+ }
10
+ } else {
11
+ validate_array($mysql::bindings::install_options )
12
+ package { 'mysql-connector-java' :
13
+ ensure => $mysql::bindings::java_package_ensure ,
14
+ install_options => $mysql::bindings::install_options ,
15
+ name => $mysql::bindings::java_package_name ,
16
+ provider => $mysql::bindings::java_package_provider ,
17
+ }
9
18
10
19
}
Original file line number Diff line number Diff line change 1
1
# Private class
2
2
class mysql::bindings::perl {
3
3
4
- package { 'perl_mysql' :
5
- ensure => $mysql::bindings::perl_package_ensure ,
6
- name => $mysql::bindings::perl_package_name ,
7
- provider => $mysql::bindings::perl_package_provider ,
4
+ if $mysql::bindings::install_options == undef {
5
+ package { 'perl_mysql' :
6
+ ensure => $mysql::bindings::perl_package_ensure ,
7
+ name => $mysql::bindings::perl_package_name ,
8
+ provider => $mysql::bindings::perl_package_provider ,
9
+ }
10
+ } else {
11
+ validate_array($mysql::bindings::install_options )
12
+ package { 'perl_mysql' :
13
+ ensure => $mysql::bindings::perl_package_ensure ,
14
+ install_options => $mysql::bindings::install_options ,
15
+ name => $mysql::bindings::perl_package_name ,
16
+ provider => $mysql::bindings::perl_package_provider ,
17
+ }
8
18
}
9
19
10
20
}
Original file line number Diff line number Diff line change 1
1
# Private class: See README.md
2
2
class mysql::bindings::php {
3
3
4
- package { 'php-mysql' :
5
- ensure => $mysql::bindings::php_package_ensure ,
6
- name => $mysql::bindings::php_package_name ,
7
- provider => $mysql::bindings::php_package_provider ,
4
+ if $mysql::bindings::install_options == undef {
5
+ package { 'php-mysql' :
6
+ ensure => $mysql::bindings::php_package_ensure ,
7
+ name => $mysql::bindings::php_package_name ,
8
+ provider => $mysql::bindings::php_package_provider ,
9
+ }
10
+ } else {
11
+ validate_array($mysql::bindings::install_options )
12
+ package { 'php-mysql' :
13
+ ensure => $mysql::bindings::php_package_ensure ,
14
+ install_options => $mysql::bindings::install_options ,
15
+ name => $mysql::bindings::php_package_name ,
16
+ provider => $mysql::bindings::php_package_provider ,
17
+ }
8
18
}
9
19
10
20
}
Original file line number Diff line number Diff line change 1
1
# Private class
2
2
class mysql::bindings::python {
3
3
4
- package { 'python-mysqldb' :
5
- ensure => $mysql::bindings::python_package_ensure ,
6
- name => $mysql::bindings::python_package_name ,
7
- provider => $mysql::bindings::python_package_provider ,
8
- }
4
+ if $mysql::bindings::install_options == undef {
5
+ package { 'python-mysqldb' :
6
+ ensure => $mysql::bindings::python_package_ensure ,
7
+ name => $mysql::bindings::python_package_name ,
8
+ provider => $mysql::bindings::python_package_provider ,
9
+ }
10
+ } else {
11
+ validate_array($mysql::bindings::install_options )
12
+ package { 'python-mysqldb' :
13
+ ensure => $mysql::bindings::python_package_ensure ,
14
+ install_options => $mysql::bindings::install_options ,
15
+ name => $mysql::bindings::python_package_name ,
16
+ provider => $mysql::bindings::python_package_provider ,
17
+ }
9
18
10
19
}
Original file line number Diff line number Diff line change 1
1
# Private class
2
2
class mysql::bindings::ruby {
3
3
4
- package { 'ruby_mysql' :
5
- ensure => $mysql::bindings::ruby_package_ensure ,
6
- name => $mysql::bindings::ruby_package_name ,
7
- provider => $mysql::bindings::ruby_package_provider ,
4
+ if $mysql::bindings::install_options == undef {
5
+ package { 'ruby_mysql' :
6
+ ensure => $mysql::bindings::ruby_package_ensure ,
7
+ name => $mysql::bindings::ruby_package_name ,
8
+ provider => $mysql::bindings::ruby_package_provider ,
9
+ }
10
+ } else {
11
+ validate_array($mysql::bindings::install_options )
12
+ package { 'ruby_mysql' :
13
+ ensure => $mysql::bindings::ruby_package_ensure ,
14
+ install_options => $mysql::bindings::install_options ,
15
+ name => $mysql::bindings::ruby_package_name ,
16
+ provider => $mysql::bindings::ruby_package_provider ,
17
+ }
8
18
}
9
19
10
20
}
Original file line number Diff line number Diff line change 1
1
#
2
2
class mysql::client (
3
3
$bindings_enable = $mysql::params::bindings_enable,
4
+ $install_options = undef ,
4
5
$package_ensure = $mysql::params::client_package_ensure,
5
6
$package_name = $mysql::params::client_package_name,
6
7
) inherits mysql::params {
Original file line number Diff line number Diff line change 1
1
class mysql::client::install {
2
2
3
- package { 'mysql_client' :
4
- ensure => $mysql::client::package_ensure ,
5
- name => $mysql::client::package_name ,
3
+ if $mysql::client::install_options == undef {
4
+ package { 'mysql_client' :
5
+ ensure => $mysql::client::package_ensure ,
6
+ name => $mysql::client::package_name ,
7
+ }
8
+ } else {
9
+ validate_array($mysql::client::install_options )
10
+ package { 'mysql_client' :
11
+ ensure => $mysql::client::package_ensure ,
12
+ install_options => $mysql::client::install_options ,
13
+ name => $mysql::client::package_name ,
14
+ }
6
15
}
7
16
8
17
}
Original file line number Diff line number Diff line change 2
2
class mysql::server (
3
3
$config_file = $mysql::params::config_file,
4
4
$includedir = $mysql::params::includedir,
5
+ $install_options = undef ,
5
6
$manage_config_file = $mysql::params::manage_config_file,
6
7
$old_root_password = $mysql::params::old_root_password,
7
8
$override_options = {},
Original file line number Diff line number Diff line change 1
1
#
2
2
class mysql::server::install {
3
3
4
- package { 'mysql-server' :
5
- ensure => $mysql::server::package_ensure ,
6
- name => $mysql::server::package_name ,
4
+ if $mysql::server::install_options == undef {
5
+ package { 'mysql-server' :
6
+ ensure => $mysql::server::package_ensure ,
7
+ name => $mysql::server::package_name ,
8
+ }
9
+ } else {
10
+ validate_array($mysql::server::install_options )
11
+ package { 'mysql-server' :
12
+ ensure => $mysql::server::package_ensure ,
13
+ install_options => $mysql::server::install_options ,
14
+ name => $mysql::server::package_name ,
15
+ }
7
16
}
8
17
9
18
# Build the initial databases.
You can’t perform that action at this time.
0 commit comments