extend sshd::nagios with ensure param

This commit is contained in:
mh 2010-10-20 22:57:15 +02:00
parent d0d3d20e14
commit eec9e72425

View file

@ -1,8 +1,19 @@
define sshd::nagios( define sshd::nagios(
$ensure = 'present',
$check_hostname = 'absent' $check_hostname = 'absent'
) { ) {
case $check_hostname { case $check_hostname {
'absent': { nagios::service{ "ssh_port_${name}": check_command => "check_ssh_port!$name" } } 'absent': {
default: { nagios::service{"ssh_port_host_${name}_${check_hostname}": check_command => "check_ssh_port_host!${name}!${check_hostname}" } } nagios::service{"ssh_port_${name}":
ensure => $esnure,
check_command => "check_ssh_port!$name"
}
}
default: {
nagios::service{"ssh_port_host_${name}_${check_hostname}":
ensure => $esnure,
check_command => "check_ssh_port_host!${name}!${check_hostname}"
}
}
} }
} }