diff options
author | mh <mh@immerda.ch> | 2012-02-10 14:35:19 +0100 |
---|---|---|
committer | mh <mh@immerda.ch> | 2012-02-10 14:35:19 +0100 |
commit | 4ac736951588128005348a48f6bf20092000a2ea (patch) | |
tree | ba076cb79131c9c4c64d623de7a11a4ac7b4c320 /manifests/server/munin/default.pp | |
parent | a72ab41660d403f7615eed0e1bf538a3f26cb8da (diff) |
migrate everything to hiera/trocla and use the new scoping style
Diffstat (limited to 'manifests/server/munin/default.pp')
-rw-r--r-- | manifests/server/munin/default.pp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/manifests/server/munin/default.pp b/manifests/server/munin/default.pp index 424f8b2..ad43dc3 100644 --- a/manifests/server/munin/default.pp +++ b/manifests/server/munin/default.pp @@ -1,12 +1,8 @@ # manifests/server/munin/default.pp class mysql::server::munin::default { - case $munin_mysql_password { - '': { fail("please specify \$munin_mysql_password to enable mysql munin plugin")} - } - mysql_user{'munin@localhost': - password_hash => mysql_password("$munin_mysql_password"), + password_hash => trocla("mysql_munin_${::fqdn}",'mysql','length: 32'), require => Package['mysql'], } @@ -15,6 +11,7 @@ class mysql::server::munin::default { require => [ Mysql_user['munin@localhost'], Package['mysql'] ], } + $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", @@ -22,7 +19,7 @@ class mysql::server::munin::default { } Munin::Plugin::Deploy{ - config => "env.mysqlopts --user=munin --password=$munin_mysql_password -h localhost", + config => "env.mysqlopts --user=munin --password=${munin_mysql_password} -h localhost", require => [ Mysql_grant['munin@localhost'], Mysql_user['munin@localhost'], |