From aa3e5936e2208214aec3700d42587acf4d5742bd Mon Sep 17 00:00:00 2001 From: Jerome Charaoui Date: Tue, 8 Dec 2009 12:43:40 -0500 Subject: use 'absent' parameter internally only in nagios::service --- manifests/service.pp | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'manifests') diff --git a/manifests/service.pp b/manifests/service.pp index eabd0f0..3e732b7 100644 --- a/manifests/service.pp +++ b/manifests/service.pp @@ -10,8 +10,8 @@ define nagios::service ( $notification_period = '', $notification_options = '', $contact_groups = '', - $use = '', - $service_description = '' ) + $use = 'absent', + $service_description = 'absent' ) { # TODO: this resource should normally accept all nagios_host parameters @@ -53,20 +53,16 @@ define nagios::service ( Nagios_service["${real_name}"] { notification_options => $notification_options } } - if ($use != 'absent') { - if ($use == '') { - Nagios_service["${real_name}"] { use => 'generic-service' } - } else { - Nagios_service["${real_name}"] { use => $use } - } + if ($use == 'absent') { + Nagios_service["${real_name}"] { use => 'generic-service' } + } else { + Nagios_service["${real_name}"] { use => $use } } - if ($service_description != 'absent') { - if ($service_description == '') { - Nagios_service["${real_name}"] { service_description => $name } - } else { - Nagios_service["${real_name}"] { service_description => $service_description } - } + if ($service_description == 'absent') { + Nagios_service["${real_name}"] { service_description => $name } + } else { + Nagios_service["${real_name}"] { service_description => $service_description } } } -- cgit v1.2.3