From: alex Date: Thu, 3 Oct 2024 19:17:33 +0000 (+0200) Subject: Allow disabling Nagios monitoring X-Git-Tag: 20241020-emacs~44 X-Git-Url: https://xn--ix-yja.es/gitweb/?a=commitdiff_plain;h=344d65baf8502845ab5cc7af59a8cb3a281ef7e2;p=alex.git Allow disabling Nagios monitoring --- diff --git a/personal_infra/puppet/site/00-common.pp b/personal_infra/puppet/site/00-common.pp index b9f2a6f..8ebc316 100644 --- a/personal_infra/puppet/site/00-common.pp +++ b/personal_infra/puppet/site/00-common.pp @@ -6,15 +6,17 @@ if $facts['os']['family'] == 'Debian' { class {'debian':} } -$nagios_host = $facts['networking']['fqdn'] +if lookup({name => 'nagios.monitor', default_value => true}) { + $nagios_host = $facts['networking']['fqdn'] -nagios_host {$nagios_host: - use => 'generic-host', - address => lookup({name => 'nagios.address', default_value => $facts['networking']['fqdn']}), - max_check_attempts => 5, - contact_groups => 'admins', - hostgroups => 'linux', - check_command => 'check-host-alive', + nagios_host {$nagios_host: + use => 'generic-host', + address => lookup({name => 'nagios.address', default_value => $facts['networking']['fqdn']}), + max_check_attempts => 5, + contact_groups => 'admins', + hostgroups => 'linux', + check_command => 'check-host-alive', + } } # https://github.com/alexpdp7/ragent/issues/352