summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2009-12-25 19:51:07 +0100
committermh <mh@immerda.ch>2009-12-25 19:51:07 +0100
commit77f601607093b7fb22f3498574d0dedd2cbe01d9 (patch)
tree30f96532313781705a32d95d4ee384635369458f /manifests
parentf5a0fce3684cc012efa60c2904647dd3ddb80f36 (diff)
enable to set the service to absent
Diffstat (limited to 'manifests')
-rw-r--r--manifests/service.pp6
1 files changed, 5 insertions, 1 deletions
diff --git a/manifests/service.pp b/manifests/service.pp
index 42d9a4d..bb9b187 100644
--- a/manifests/service.pp
+++ b/manifests/service.pp
@@ -1,6 +1,6 @@
define nagios::service(
$ensure = present,
- $check_command,
+ $check_command = absent,
$host_name = $fqdn,
$use = 'generic-service',
$notification_period = "24x7",
@@ -13,6 +13,10 @@ define nagios::service(
$service_description = 'absent')
{
+ if $ensure == present and $check_command == absent {
+ fail("You have to define \$check_command if nagios::service shoudl be present!")
+ }
+
# this ensures nagios internal check, that every
# service has it's host
# temporary disabled.