diff --git a/deployment/puppet/mysql/examples/test.pp b/deployment/puppet/mysql/examples/test.pp new file mode 100644 index 0000000000..4590c4d521 --- /dev/null +++ b/deployment/puppet/mysql/examples/test.pp @@ -0,0 +1,25 @@ +# Class: mysql::config +# +# Parameters: +# +# [*root_password*] - root user password. +# [*old_root_password*] - previous root user password, +# [*bind_address*] - address to bind service. +# [*port*] - port to bind service. +# [*etc_root_password*] - whether to save /etc/.my.cnf. +# [*service_name*] - mysql service name. +# [*config_file*] - my.cnf configuration file path. +# [*socket*] - mysql socket. +# [*datadir*] - path to datadir. +# [*ssl] - enable ssl +# [*ssl_ca] - path to ssl-ca +# [*ssl_cert] - path to ssl-cert +# [*ssl_key] - path to ssl-key +# +class {'mysql::server': + config_hash =>{ + 'root_password' => 'r00tme', + 'bind_address' => '0.0.0.0' + }, +} + diff --git a/deployment/puppet/mysql/manifests/config.pp b/deployment/puppet/mysql/manifests/config.pp index e692121133..fbf23adb02 100644 --- a/deployment/puppet/mysql/manifests/config.pp +++ b/deployment/puppet/mysql/manifests/config.pp @@ -107,14 +107,15 @@ class mysql::config( } } -# file { '/etc/mysql': -# ensure => directory, -# mode => '0755', -# } -# file { '/etc/mysql/conf.d': -# ensure => directory, -# mode => '0755', -# } + file { '/etc/mysql': + ensure => directory, + mode => '0755', + } + file { '/etc/mysql/conf.d': + ensure => directory, + mode => '0755', + } + file { $config_file: content => template('mysql/my.cnf.erb'), mode => '0644',