From: Stephen Gran Date: Sat, 17 Oct 2009 00:07:55 +0000 (+0100) Subject: make the munin check allow for removals as well X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=162e4df691c0765b962b547feefcbdbfe0198f9b;hp=4b8bd3b11bf706f3cfdcf8e07e4f5abda3b93750;p=mirror%2Fdsa-puppet.git make the munin check allow for removals as well Signed-off-by: Stephen Gran --- 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"]; + } } }