diff options
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/server.pp | 5 | ||||
-rw-r--r-- | manifests/server/base.pp | 4 | ||||
-rw-r--r-- | manifests/server/nagios.pp | 7 |
3 files changed, 9 insertions, 7 deletions
diff --git a/manifests/server.pp b/manifests/server.pp index ca7ffa9..3d9b129 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -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 } diff --git a/manifests/server/base.pp b/manifests/server/base.pp index 7bca15d..de421b3 100644 --- a/manifests/server/base.pp +++ b/manifests/server/base.pp @@ -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 } diff --git a/manifests/server/nagios.pp b/manifests/server/nagios.pp index 18eef8a..0ceb968 100644 --- a/manifests/server/nagios.pp +++ b/manifests/server/nagios.pp @@ -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'), |