diff options
author | Jerome Charaoui <jcharaoui@cmaisonneuve.qc.ca> | 2015-04-17 17:18:25 -0400 |
---|---|---|
committer | Jerome Charaoui <jcharaoui@cmaisonneuve.qc.ca> | 2015-04-17 17:18:25 -0400 |
commit | e5a66002f3e912a04e2f879a3a57af43c5e0fe49 (patch) | |
tree | c989b00c57872e047140fc555eb7b63fa42f3077 | |
parent | 31ecdf427dcb8f55b726937777c718f959333f79 (diff) |
Restore a few things that got removed:
* Manage /etc/mysql/mysql.conf.d
* Account security ensures
* Check mysql_exists before realizing ressources
These last two points partially revert commit
e1649647f326abeb256a73e4cb1060840f846f24
-rw-r--r-- | manifests/server/base.pp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/manifests/server/base.pp b/manifests/server/base.pp index 322ae9a..ba90520 100644 --- a/manifests/server/base.pp +++ b/manifests/server/base.pp @@ -77,8 +77,20 @@ class mysql::server::base { require => Package['mysql-server'], } - # Collect all databases and users - Mysql_database<<| tag == "mysql_${::fqdn}" |>> - Mysql_user<<| tag == "mysql_${::fqdn}" |>> - Mysql_grant<<| tag == "mysql_${::fqdn}" |>> + file { '/etc/mysql/conf.d': + ensure => directory, + owner => 'root', + group => 0, + mode => '0755', + } + + if str2bool($::mysql_exists) { + include mysql::server::account_security + + # Collect all databases and users + Mysql_database<<| tag == "mysql_${::fqdn}" |>> + Mysql_user<<| tag == "mysql_${::fqdn}" |>> + Mysql_grant<<| tag == "mysql_${::fqdn}" |>> + } + } |