aboutsummaryrefslogtreecommitdiff
path: root/manifests/nagios.pp
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2010-10-20 23:12:43 +0200
committermh <mh@immerda.ch>2010-10-20 23:12:43 +0200
commit28342ba418ede266526aaaad5c89834883b4b16e (patch)
tree7429dcf5b9387657cd0f920790a8fe1d5a19aeae /manifests/nagios.pp
parenteec9e7242525cd9909c0c54cdb7515047bac4407 (diff)
downloadpuppet-sshd-28342ba418ede266526aaaad5c89834883b4b16e.tar.gz
puppet-sshd-28342ba418ede266526aaaad5c89834883b4b16e.tar.bz2
introduce that port also can't be the name, fix ensure problem
Diffstat (limited to 'manifests/nagios.pp')
-rw-r--r--manifests/nagios.pp15
1 files changed, 10 insertions, 5 deletions
diff --git a/manifests/nagios.pp b/manifests/nagios.pp
index 1500a09..4971f65 100644
--- a/manifests/nagios.pp
+++ b/manifests/nagios.pp
@@ -1,18 +1,23 @@
define sshd::nagios(
+ $port = 'absent',
$ensure = 'present',
$check_hostname = 'absent'
) {
+ $real_port = $port ? {
+ 'absent' => $name,
+ default => $port,
+ }
case $check_hostname {
'absent': {
nagios::service{"ssh_port_${name}":
- ensure => $esnure,
- check_command => "check_ssh_port!$name"
+ ensure => $ensure,
+ check_command => "check_ssh_port!$port"
}
}
default: {
- nagios::service{"ssh_port_host_${name}_${check_hostname}":
- ensure => $esnure,
- check_command => "check_ssh_port_host!${name}!${check_hostname}"
+ nagios::service{"ssh_port_host_${name}":
+ ensure => $ensure,
+ check_command => "check_ssh_port_host!${port}!${check_hostname}"
}
}
}