summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorGabriel Filion <gabster@lelutin.ca>2016-01-31 18:21:46 -0500
committerGabriel Filion <gabster@lelutin.ca>2016-01-31 18:21:46 -0500
commitc6faaaf04cbf33db4430893b6b0eeacfc5f74776 (patch)
tree9082ca7f21497cc48159a776a6f638bf9c2e8d68 /manifests
parenta534036c8d036275aa802f86470d67e4ee46db96 (diff)
nrpe: parametrize dont_blame_nrpe
This value is used in order to enable or disable arguments to nrpe commands. Since some ppl might need to enable it, we should parametrize it.
Diffstat (limited to 'manifests')
-rw-r--r--manifests/nrpe.pp5
-rw-r--r--manifests/nrpe/base.pp2
2 files changed, 6 insertions, 1 deletions
diff --git a/manifests/nrpe.pp b/manifests/nrpe.pp
index eb68189..364a2c8 100644
--- a/manifests/nrpe.pp
+++ b/manifests/nrpe.pp
@@ -5,8 +5,13 @@ class nagios::nrpe (
$plugin_dir = '',
$server_address = '',
$allowed_hosts = '',
+ $dont_blame = '1',
) {
+ if !($dont_blame in ['0', '1']) {
+ fail('Unrecognized value for $dont_blame, must be one of "0", or "1".')
+ }
+
case $::operatingsystem {
'FreeBSD': {
if $cfg_dir == '' { $real_cfg_dir = '/usr/local/etc' }
diff --git a/manifests/nrpe/base.pp b/manifests/nrpe/base.pp
index fb62693..03ac5ab 100644
--- a/manifests/nrpe/base.pp
+++ b/manifests/nrpe/base.pp
@@ -7,6 +7,7 @@ class nagios::nrpe::base {
$plugin_dir = $::nagios::nrpe::real_plugin_dir
$server_address = $::nagios::nrpe::server_address
$allowed_hosts = $::nagios::nrpe::allowed_hosts
+ $dont_blame = $::nagios::nrpe::dont_blame
package{['nagios-nrpe-server', 'nagios-plugins-basic', 'libwww-perl']:
ensure => installed;
@@ -22,7 +23,6 @@ class nagios::nrpe::base {
ensure => directory;
}
- if $nagios_nrpe_dont_blame == '' { $nagios_nrpe_dont_blame = 1 }
file { "${cfg_dir}/nrpe.cfg":
content => template('nagios/nrpe/nrpe.cfg'),
owner => root,