diff options
Diffstat (limited to 'manifests/target.pp')
-rw-r--r-- | manifests/target.pp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/manifests/target.pp b/manifests/target.pp index aaa67cf..40ff18a 100644 --- a/manifests/target.pp +++ b/manifests/target.pp @@ -3,14 +3,20 @@ class nagios::target( $parents = 'absent', $address = $::ipaddress, - $nagios_alias = $::hostname, + $nagios_alias = $::false, $hostgroups = 'absent', $notes = 'absent' ){ @@nagios_host { $::fqdn: address => $address, - alias => $nagios_alias, - use => 'generic-host', + use => 'generic-host', + } + # 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') { |