From 7288988a6d3f2785f5e23bd2d7a7f6c275421c00 Mon Sep 17 00:00:00 2001 From: nadir Date: Thu, 8 Nov 2012 14:42:27 +0100 Subject: unquoted boolean variables --- README | 2 +- manifests/service.pp | 4 ++-- 2 files changed, 3 insertions(+), 3 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..918ce24 100644 --- a/manifests/service.pp +++ b/manifests/service.pp @@ -30,8 +30,8 @@ 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\"" -- cgit v1.2.3 From df559db6f6cbe65393b2ebcc571ebdaed06e0cf3 Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Sun, 19 Apr 2015 17:07:41 -0400 Subject: nagios::service typo in variable This invalidates the point of that if block since it will probably never be true that some undefined (read mis-typed) variable is set to 'absent'. --- manifests/service.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/service.pp b/manifests/service.pp index 918ce24..3e8f6c8 100644 --- a/manifests/service.pp +++ b/manifests/service.pp @@ -27,7 +27,7 @@ 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) { -- cgit v1.2.3