1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
# manifests/target.pp class nagios::target { @@nagios_host { "${fqdn}": address => $ipaddress, alias => $hostname, use => 'generic-host', } if ($nagios_parents != '') { Nagios_host["${fqdn}"] { parents => $nagios_parents } } }