summaryrefslogtreecommitdiff
path: root/manifests/target.pp
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2012-06-05 19:34:51 -0300
committermh <mh@immerda.ch>2012-06-05 19:34:51 -0300
commit0fe7552f256f0b1508cc5d3cab952eb93bee6811 (patch)
tree9769eab5ea4b9bf6f49c2c11d9a9b9e1736361c9 /manifests/target.pp
parent3db1ca8f85b28978a3a9c09de3551f536b1375a6 (diff)
new style for 2.7
Diffstat (limited to 'manifests/target.pp')
-rw-r--r--manifests/target.pp14
1 files changed, 8 insertions, 6 deletions
diff --git a/manifests/target.pp b/manifests/target.pp
index 675ac1a..fc39834 100644
--- a/manifests/target.pp
+++ b/manifests/target.pp
@@ -1,15 +1,17 @@
# manifests/target.pp
-class nagios::target {
+class nagios::target(
+ $parents = 'absent',
+) {
- @@nagios_host { "${fqdn}":
- address => $ipaddress,
- alias => $hostname,
+ @@nagios_host { $::fqdn:
+ address => $::ipaddress,
+ alias => $::hostname,
use => 'generic-host',
}
- if ($nagios_parents != '') {
- Nagios_host["${fqdn}"] { parents => $nagios_parents }
+ if ($parents != 'absent') {
+ Nagios_host["${::fqdn}"] { parents => $parents }
}
}