extend sshd::nagios with ensure param
This commit is contained in:
parent
d0d3d20e14
commit
eec9e72425
1 changed files with 13 additions and 2 deletions
|
@ -1,8 +1,19 @@
|
|||
define sshd::nagios(
|
||||
$ensure = 'present',
|
||||
$check_hostname = 'absent'
|
||||
) {
|
||||
case $check_hostname {
|
||||
'absent': { nagios::service{ "ssh_port_${name}": check_command => "check_ssh_port!$name" } }
|
||||
default: { nagios::service{"ssh_port_host_${name}_${check_hostname}": check_command => "check_ssh_port_host!${name}!${check_hostname}" } }
|
||||
'absent': {
|
||||
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}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue