diff options
Diffstat (limited to 'manifests/server/nagios.pp')
-rw-r--r-- | manifests/server/nagios.pp | 7 |
1 files changed, 3 insertions, 4 deletions
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'), |