summaryrefslogtreecommitdiff
path: root/manifests/target.pp
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2015-08-11 10:23:09 +0200
committervarac <varacanero@zeromail.org>2015-08-11 10:23:09 +0200
commitd6415ae32172bcadd6f0abf5cd7df3d473f84086 (patch)
treef3cb06c4f50fa5e44a2bee1fbf6f483befa0a00b /manifests/target.pp
parentb55f23d4d90c97cec08251544aa9700df86ad0b3 (diff)
parent1fd73c0f48458c412b0abcf919aca5bd5f1fd516 (diff)
Merge remote-tracking branch 'shared/master' into leap_master
Conflicts: README manifests/base.pp manifests/defaults/commands.pp manifests/nrpe.pp manifests/service.pp manifests/target.pp templates/nrpe/nrpe_command.erb
Diffstat (limited to 'manifests/target.pp')
-rw-r--r--manifests/target.pp12
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') {