From 310117d43855c0ee538bb6e9096a72ec35d14d37 Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 25 Apr 2008 20:47:10 +0000 Subject: fixed parrent issue --- manifests/init.pp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'manifests/init.pp') diff --git a/manifests/init.pp b/manifests/init.pp index d481726..67049e6 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -181,11 +181,7 @@ class nagios::target { } class nagios::target::host { - $real_nagios_parent = $nagios_parent ? { - '' => 'none', - default => $nagios_parent - } - nagios::host { $fqdn: parents => $real_nagios_parent } + nagios::host { $fqdn: parents => $nagios_parent } } # defines @@ -202,6 +198,10 @@ define nagios::host( '' => 'admins', default => $nagios_contact_groups_in } + $real_nagios_parents = $parents ? { + '' => 'localhost', + default => $parents + } @@nagios_host { $name: ensure => present, @@ -209,7 +209,7 @@ define nagios::host( alias => $nagios_alias, max_check_attempts => $max_check_attempts, notification_interval => $notification_interval, - parents => $parents, + parents => $real_nagios_parents, use => $use, } } -- cgit v1.2.3