From e1649647f326abeb256a73e4cb1060840f846f24 Mon Sep 17 00:00:00 2001 From: mh Date: Sat, 24 Jan 2015 18:05:08 +0100 Subject: fix issues for EL7 + simplify account security * EL7 uses mariadb & systemd -> adjust setpasswd script to that * move the security ensurance to the setpassword script, as it's easier to ensure that there --- manifests/server/account_security.pp | 8 -------- manifests/server/base.pp | 15 ++++++--------- 2 files changed, 6 insertions(+), 17 deletions(-) delete mode 100644 manifests/server/account_security.pp (limited to 'manifests') diff --git a/manifests/server/account_security.pp b/manifests/server/account_security.pp deleted file mode 100644 index a17f0b3..0000000 --- a/manifests/server/account_security.pp +++ /dev/null @@ -1,8 +0,0 @@ -# some installations have some default users which are not required. -# We remove them here. You can subclass this class to overwrite this behavior. -class mysql::server::account_security { - mysql_user{ [ "root@${::fqdn}", 'root@127.0.0.1', "@${::fqdn}", '@localhost', '@%' ]: - ensure => 'absent', - require => Exec['mysql_set_rootpw'], - } -} diff --git a/manifests/server/base.pp b/manifests/server/base.pp index 1ed75f2..0863950 100644 --- a/manifests/server/base.pp +++ b/manifests/server/base.pp @@ -33,7 +33,8 @@ class mysql::server::base { mode => '0755'; '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, @@ -72,12 +73,8 @@ class mysql::server::base { require => Package['mysql-server'], } - 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}" |>> - } + # Collect all databases and users + Mysql_database<<| tag == "mysql_${::fqdn}" |>> + Mysql_user<<| tag == "mysql_${::fqdn}" |>> + Mysql_grant<<| tag == "mysql_${::fqdn}" |>> } -- cgit v1.2.3