diff options
author | Jerome Charaoui <jcharaoui@cmaisonneuve.qc.ca> | 2009-12-08 12:43:40 -0500 |
---|---|---|
committer | Jerome Charaoui <jcharaoui@cmaisonneuve.qc.ca> | 2009-12-08 12:43:40 -0500 |
commit | aa3e5936e2208214aec3700d42587acf4d5742bd (patch) | |
tree | e78d2a45337b047bf1f77a3f792a4e90f9343f15 /manifests | |
parent | e24467aa337d0c689358124e7aaf5dc777dfabdb (diff) |
use 'absent' parameter internally only in nagios::service
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/service.pp | 24 |
1 files changed, 10 insertions, 14 deletions
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 } } } |