summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2015-04-19 22:17:08 +0000
committervarac <varacanero@zeromail.org>2015-04-19 22:17:08 +0000
commitc476d34e348fdb2fa77458d60432e5cd92e9a3be (patch)
treefff0e3fa3835d5b5a3b9285347806ccd9a0403b1
parent0b20e1e0fd001cb0b688c6bf6971c8e7c3f743c6 (diff)
parentdf559db6f6cbe65393b2ebcc571ebdaed06e0cf3 (diff)
Merge branch 'unquote_booleans' into 'master'
Unquote booleans Some variables and if blocks use quoted booleans when we should be using the native boolean type. Also, when working on this, I saw an issue with a mistyped variable in nagios::service so I fixed it. This is a followup of: https://labs.riseup.net/code/issues/4093 See merge request !9
-rw-r--r--README2
-rw-r--r--manifests/service.pp6
2 files changed, 4 insertions, 4 deletions
diff --git a/README b/README
index 0949071..4e5a824 100644
--- a/README
+++ b/README
@@ -73,7 +73,7 @@ nagios server define a service that will check the NRPE command 'check_cpu' on
the current node:
nagios::service { 'CPU Usage':
- use_nrpe => 'true',
+ use_nrpe => true,
check_command => "check_cpu",
nrpe_args => "-t 60"
}
diff --git a/manifests/service.pp b/manifests/service.pp
index 134d1f7..3e8f6c8 100644
--- a/manifests/service.pp
+++ b/manifests/service.pp
@@ -27,11 +27,11 @@ define nagios::service (
}
if $ensure != 'absent' {
- if $check_comand == 'absent' {
+ if $check_command == '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\""