From e5a66002f3e912a04e2f879a3a57af43c5e0fe49 Mon Sep 17 00:00:00 2001 From: Jerome Charaoui Date: Fri, 17 Apr 2015 17:18:25 -0400 Subject: 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 --- manifests/server/base.pp | 20 ++++++++++++++++---- 1 file 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}" |>> + } + } -- cgit v1.2.3