summaryrefslogtreecommitdiff
path: root/manifests/nrpe/command.pp
diff options
context:
space:
mode:
authorGabriel Filion <gabster@lelutin.ca>2016-01-31 18:19:57 -0500
committerGabriel Filion <gabster@lelutin.ca>2016-01-31 18:19:57 -0500
commita534036c8d036275aa802f86470d67e4ee46db96 (patch)
tree495c77f0fe994745a21b7ce14dc45a126637ae39 /manifests/nrpe/command.pp
parentd1321c39001ebd445b37fd551fbfd324b6ab6ae0 (diff)
parametrize nagios::nrpe
the current code for configuring NRPE is still relying on global variables. This is not working at all with puppet 3.x and forward, so in order to make this code functional, we need to parametrize values that are used.
Diffstat (limited to 'manifests/nrpe/command.pp')
-rw-r--r--manifests/nrpe/command.pp10
1 files changed, 5 insertions, 5 deletions
diff --git a/manifests/nrpe/command.pp b/manifests/nrpe/command.pp
index 196996c..bdd89a7 100644
--- a/manifests/nrpe/command.pp
+++ b/manifests/nrpe/command.pp
@@ -8,12 +8,12 @@ define nagios::nrpe::command (
fail('Either one of $command_line or $source must be given to nagios::nrpe::command.' )
}
- $nagios_nrpe_cfgdir = $nagios::nrpe::base::nagios_nrpe_cfgdir
+ $cfg_dir = $nagios::nrpe::real_cfg_dir
- file{"${nagios_nrpe_cfgdir}/nrpe.d/${name}_command.cfg":
+ file{"${cfg_dir}/nrpe.d/${name}_command.cfg":
ensure => $ensure,
notify => Service['nagios-nrpe-server'],
- require => File ["${nagios_nrpe_cfgdir}/nrpe.d" ],
+ require => File ["${cfg_dir}/nrpe.d" ],
owner => 'root',
group => 0,
mode => '0644';
@@ -21,12 +21,12 @@ define nagios::nrpe::command (
case $source {
'': {
- File["${nagios_nrpe_cfgdir}/nrpe.d/${name}_command.cfg"] {
+ File["${cfg_dir}/nrpe.d/${name}_command.cfg"] {
content => template('nagios/nrpe/nrpe_command.erb'),
}
}
default: {
- File["${nagios_nrpe_cfgdir}/nrpe.d/${name}_command.cfg"] {
+ File["${cfg_dir}/nrpe.d/${name}_command.cfg"] {
source => $source,
}
}