diff options
author | Gabriel Filion <gabster@lelutin.ca> | 2016-01-31 18:21:46 -0500 |
---|---|---|
committer | Gabriel Filion <gabster@lelutin.ca> | 2016-01-31 18:21:46 -0500 |
commit | c6faaaf04cbf33db4430893b6b0eeacfc5f74776 (patch) | |
tree | 9082ca7f21497cc48159a776a6f638bf9c2e8d68 /manifests | |
parent | a534036c8d036275aa802f86470d67e4ee46db96 (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.pp | 5 | ||||
-rw-r--r-- | manifests/nrpe/base.pp | 2 |
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, |