aboutsummaryrefslogtreecommitdiff
path: root/personal_infra
diff options
context:
space:
mode:
Diffstat (limited to 'personal_infra')
-rw-r--r--personal_infra/puppet/site/00-common.pp18
1 files changed, 10 insertions, 8 deletions
diff --git a/personal_infra/puppet/site/00-common.pp b/personal_infra/puppet/site/00-common.pp
index b9f2a6f7..8ebc3167 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