diff options
author | mh <mh@immerda.ch> | 2009-12-25 19:43:47 +0100 |
---|---|---|
committer | mh <mh@immerda.ch> | 2009-12-25 19:43:47 +0100 |
commit | f5a0fce3684cc012efa60c2904647dd3ddb80f36 (patch) | |
tree | 588492cb5594c53f60780c111ed578dd3855d849 /manifests | |
parent | c04458174e23b7b21f687cefdf11ac9a8aabf679 (diff) |
enable to set the extra_host to absent
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/extra_host.pp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/manifests/extra_host.pp b/manifests/extra_host.pp index 3150612..8f52de0 100644 --- a/manifests/extra_host.pp +++ b/manifests/extra_host.pp @@ -2,11 +2,14 @@ # a ping serivce is automatically added define nagios::extra_host( $ensure = present, - $ip, - $nagios_alias, + $ip = 'absent', + $nagios_alias = 'absent', $use = 'generic-host', $parents = 'localhost' ) { + if $ensure == 'present' and ($ip == 'absent' or $nagios_alias == 'absent'){ + fail("You need to define \$ip and \$nagios_alias if extra_host should be present!") + } nagios::host{$name: ensure => $ensure, ip => $ip, |