From eec9e7242525cd9909c0c54cdb7515047bac4407 Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 20 Oct 2010 22:57:15 +0200 Subject: extend sshd::nagios with ensure param --- manifests/nagios.pp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'manifests') diff --git a/manifests/nagios.pp b/manifests/nagios.pp index 890810e..1500a09 100644 --- a/manifests/nagios.pp +++ b/manifests/nagios.pp @@ -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}" + } + } } } -- cgit v1.2.3