diff options
author | varac <varacanero@zeromail.org> | 2013-01-24 17:43:48 +0100 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2013-01-24 17:43:48 +0100 |
commit | b141c9b7cd4be9509c2839266c28b2f4da12fc35 (patch) | |
tree | 0643d81db95a3253a98227a25b7cac28736de3b1 /manifests | |
parent | e693bcb3b7f904f2e8e63b9a6d529ce22e472e4f (diff) |
indentation, use_nrpe works
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/service.pp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/manifests/service.pp b/manifests/service.pp index 38de906..c214d7e 100644 --- a/manifests/service.pp +++ b/manifests/service.pp @@ -30,20 +30,22 @@ define nagios::service ( if $check_comand == 'absent' { fail("Must pass a check_command to ${name} if it should be present") } - if ($use_nrpe == true) { - include nagios::command::nrpe_timeout + if $use_nrpe == true { + include nagios::command::nrpe_timeout if ($nrpe_args != '') { - $real_check_command = "check_nrpe_timeout!$nrpe_timeout!$check_command!\"$nrpe_args\"" - } else { - $real_check_command = "check_nrpe_1arg_timeout!$nrpe_timeout!$check_command" - } - } else { + $real_check_command = "check_nrpe_timeout!$nrpe_timeout!$check_command!\"$nrpe_args\"" + } + else { + $real_check_command = "check_nrpe_1arg_timeout!$nrpe_timeout!$check_command" + } + } + else { $real_check_command = "$check_command" } Nagios_service["${real_name}"] { - check_command => $check_command, + check_command => $real_check_command, host_name => $host_name, use => $use, service_description => $service_description ?{ |