summaryrefslogtreecommitdiff
path: root/manifests/server
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2012-12-09 15:52:34 +0100
committermh <mh@immerda.ch>2012-12-09 15:52:34 +0100
commitde7cb43faa01ea83dce6e2ad433694b0d000832c (patch)
tree36d581871482647b84b2c186a0ac7ae3bd671673 /manifests/server
parent828d52e667a99432d55ee36f52b3430ca699a3a6 (diff)
fix dependency issues
Diffstat (limited to 'manifests/server')
-rw-r--r--manifests/server/account_security.pp10
-rw-r--r--manifests/server/base.pp2
-rw-r--r--manifests/server/munin/default.pp11
3 files changed, 10 insertions, 13 deletions
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':