From 162e4df691c0765b962b547feefcbdbfe0198f9b Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Sat, 17 Oct 2009 01:07:55 +0100 Subject: [PATCH] make the munin check allow for removals as well Signed-off-by: Stephen Gran --- modules/munin-node/manifests/init.pp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/modules/munin-node/manifests/init.pp b/modules/munin-node/manifests/init.pp index 54f29e983..698899cf8 100644 --- a/modules/munin-node/manifests/init.pp +++ b/modules/munin-node/manifests/init.pp @@ -1,7 +1,16 @@ -define activate_munin_check() { - file { "/etc/munin/plugins/$name": - ensure => "/usr/share/munin/plugins/$name", - notify => Exec["munin-node restart"]; +define activate_munin_check($ensure=present) { + case $ensure { + present: { + file { "/etc/munin/plugins/$name": + ensure => "/usr/share/munin/plugins/$name", + notify => Exec["munin-node restart"]; + } + } + default: { + file { "/etc/munin/plugins/$name": + ensure => $ensure, + notify => Exec["munin-node restart"]; + } } } -- 2.20.1