take hiera out of the params

This commit is contained in:
mh 2012-06-14 14:53:44 -03:00
parent 01ab6a5315
commit 956edf58cc
3 changed files with 9 additions and 7 deletions

View file

@ -1,7 +1,10 @@
class mysql::server (
$manage_shorewall = false,
$manage_munin = false,
$manage_nagios = false
$manage_nagios = false,
$backup_cron = false,
$optimize_cron = false,
$nagios_notcp = false
) {
case $::operatingsystem {
gentoo: { include mysql::server::gentoo }

View file

@ -57,11 +57,11 @@ class mysql::server::base {
refreshonly => true,
}
if hiera('mysql_backup_cron',false) {
if $mysql::server::backup_cron {
include mysql::server::cron::backup
}
if hiera('mysql_optimize_cron',false) {
if $mysql::server::optimize_cron {
include mysql::server::cron::optimize
}

View file

@ -1,16 +1,15 @@
class mysql::server::nagios {
# Flip this variable if you need to check MySQL through check_ssh or check_nrpe,
# in that case you will have to manually define nagios::service::mysql
if (hiera('nagios_mysql_notcp',false) != true) {
if $mysql::server::nagios_notcp {
$nagios_mysql_user = 'nagios@localhost'
} else {
$nagios_mysql_user = 'nagios@%'
nagios::service::mysql { 'connection-time':
check_hostname => $::fqdn,
require => Mysql_grant[$nagios_mysql_user],
}
}
else {
$nagios_mysql_user = 'nagios@localhost'
}
mysql_user{$nagios_mysql_user:
password_hash => trocla("mysql_nagios_${::fqdn}",'mysql','length: 32'),