summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerome Charaoui <jcharaoui@cmaisonneuve.qc.ca>2015-04-17 17:18:25 -0400
committerJerome Charaoui <jcharaoui@cmaisonneuve.qc.ca>2015-04-17 17:18:25 -0400
commite5a66002f3e912a04e2f879a3a57af43c5e0fe49 (patch)
treec989b00c57872e047140fc555eb7b63fa42f3077
parent31ecdf427dcb8f55b726937777c718f959333f79 (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.pp20
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}" |>>
+ }
+
}