From de7cb43faa01ea83dce6e2ad433694b0d000832c Mon Sep 17 00:00:00 2001 From: mh Date: Sun, 9 Dec 2012 15:52:34 +0100 Subject: fix dependency issues --- manifests/server/account_security.pp | 10 +++++----- manifests/server/base.pp | 2 +- manifests/server/munin/default.pp | 11 ++++------- 3 files changed, 10 insertions(+), 13 deletions(-) (limited to 'manifests/server') diff --git a/manifests/server/account_security.pp b/manifests/server/account_security.pp index b5d75ca..a17f0b3 100644 --- a/manifests/server/account_security.pp +++ b/manifests/server/account_security.pp @@ -1,8 +1,8 @@ +# 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 { - # some installations have some default users which are not required. - # We remove them here. You can subclass this class to overwrite this behavior. - mysql_user{ [ "root@${::fqdn}", "root@127.0.0.1", "@${::fqdn}", "@localhost", "@%" ]: - ensure => 'absent', - require => Service['mysql'], + 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 0709a54..23d2f35 100644 --- a/manifests/server/base.pp +++ b/manifests/server/base.pp @@ -58,7 +58,7 @@ 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'], Package['mysql-server'] ], + require => [ File['mysql_setmysqlpass.sh'], Service['mysql'] ], refreshonly => true, } diff --git a/manifests/server/munin/default.pp b/manifests/server/munin/default.pp index 04902b2..acdaabb 100644 --- a/manifests/server/munin/default.pp +++ b/manifests/server/munin/default.pp @@ -2,27 +2,24 @@ class mysql::server::munin::default { mysql_user{'munin@localhost': password_hash => trocla("mysql_munin_${::fqdn}",'mysql','length: 32'), - require => Package['mysql'], + require => Exec['mysql_set_rootpw'], } mysql_grant{'munin@localhost': privileges => 'select_priv', - require => [ Mysql_user['munin@localhost'], Package['mysql'] ], + require => Mysql_user['munin@localhost'], } $munin_mysql_password = trocla("mysql_munin_${::fqdn}",'plain', 'length: 32') munin::plugin { [mysql_bytes, mysql_queries, mysql_slowqueries, mysql_threads]: config => "env.mysqlopts --user=munin --password='${munin_mysql_password}' -h localhost", - require => [ Mysql_grant['munin@localhost'], Mysql_user['munin@localhost'], Package['mysql'] ] + require => Mysql_grant['munin@localhost'], } Munin::Plugin::Deploy{ config => "env.mysqlopts --user=munin --password='${munin_mysql_password}' -h localhost", - require => - [ Mysql_grant['munin@localhost'], - Mysql_user['munin@localhost'], - Package['mysql'] ] + require => Mysql_grant['munin@localhost'], } munin::plugin::deploy{ 'mysql_connections': -- cgit v1.2.3