summaryrefslogtreecommitdiff
path: root/manifests/server/base.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/server/base.pp')
-rw-r--r--manifests/server/base.pp33
1 files changed, 13 insertions, 20 deletions
diff --git a/manifests/server/base.pp b/manifests/server/base.pp
index 0ac74f2..71f1241 100644
--- a/manifests/server/base.pp
+++ b/manifests/server/base.pp
@@ -8,10 +8,10 @@ class mysql::server::base {
path => '/etc/mysql/my.cnf',
source => [
"puppet:///modules/site_mysql/${::fqdn}/my.cnf",
- "puppet:///modules/site_mysql/my.cnf.${::operatingsystem}.{lsbdistcodename}",
+ "puppet:///modules/site_mysql/my.cnf.${::operatingsystem}.${::operatingsystemmajrelease}",
"puppet:///modules/site_mysql/my.cnf.${::operatingsystem}",
'puppet:///modules/site_mysql/my.cnf',
- "puppet:///modules/mysql/config/my.cnf.${::operatingsystem}.{lsbdistcodename}",
+ "puppet:///modules/mysql/config/my.cnf.${::operatingsystem}.${::operatingsystemmajrelease}",
"puppet:///modules/mysql/config/my.cnf.${::operatingsystem}",
'puppet:///modules/mysql/config/my.cnf'
],
@@ -31,16 +31,10 @@ class mysql::server::base {
owner => mysql,
group => mysql,
mode => '0755';
- 'mysql_ibdata1':
- path => '/var/lib/mysql/data/ibdata1',
- require => Package['mysql-server'],
- before => File['mysql_setmysqlpass.sh'],
- owner => mysql,
- group => mysql,
- mode => '0660';
'mysql_setmysqlpass.sh':
path => '/usr/local/sbin/setmysqlpass.sh',
- source => "puppet:///modules/mysql/scripts/${::operatingsystem}/setmysqlpass.sh",
+ source => ["puppet:///modules/mysql/scripts/${::operatingsystem}/setmysqlpass.sh.${::operatingsystemmajrelease}",
+ "puppet:///modules/mysql/scripts/${::operatingsystem}/setmysqlpass.sh", ],
require => Package['mysql-server'],
owner => root,
group => 0,
@@ -57,7 +51,6 @@ class mysql::server::base {
exec { 'mysql_set_rootpw':
command => '/usr/local/sbin/setmysqlpass.sh',
- unless => 'mysqladmin -uroot status > /dev/null',
require => [ File['mysql_setmysqlpass.sh'], Service['mysql'] ],
# this is for security so that we only change the password
# if the password file itself has changed
@@ -91,15 +84,6 @@ class mysql::server::base {
require => Package['mysql-server'],
}
- if $::mysql_exists == 'true' {
- 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}" |>>
- }
-
file { '/etc/mysql/conf.d':
ensure => directory,
owner => 'root',
@@ -107,4 +91,13 @@ class mysql::server::base {
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}" |>>
+ }
+
}