diff options
author | mh <mh@immerda.ch> | 2015-10-25 14:43:23 +0100 |
---|---|---|
committer | mh <mh@immerda.ch> | 2015-10-25 14:44:25 +0100 |
commit | edd580ab2dc92adcb8291fd17d268cfbb6226c3b (patch) | |
tree | 2c713b514212c71d67ae90d6f31041630941a616 /manifests/target.pp | |
parent | cfff7d115e4cff2a4aa5bcfbd01e7ebe265b7a48 (diff) | |
parent | f215de3de43f141ae71fd124a84003d157da7295 (diff) |
Merge remote-tracking branch 'shared/master'
Diffstat (limited to 'manifests/target.pp')
-rw-r--r-- | manifests/target.pp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/manifests/target.pp b/manifests/target.pp index 82cf6a1..2036e01 100644 --- a/manifests/target.pp +++ b/manifests/target.pp @@ -2,7 +2,7 @@ class nagios::target( $parents = 'absent', $address = $::ipaddress, - $nagios_alias = $::hostname, + $nagios_alias = false, $hostgroups = 'absent', $use = 'generic-host', ){ @@ -11,15 +11,22 @@ class nagios::target( alias => $nagios_alias, use => $use, } + # Watch out with using aliases: they need to be unique throughout *all* + # resources in a given host's catalogue. + if $nagios_alias { + Nagios_host[$::fqdn]{ + alias => $nagios_alias + } + } if ($parents != 'absent') { - Nagios_host[$::fqdn] { + Nagios_host[$::fqdn]{ parents => $parents } } if ($hostgroups != 'absent') { - Nagios_host[$::fqdn] { + Nagios_host[$::fqdn]{ hostgroups => $hostgroups } } |