make the munin check allow for removals as well
authorStephen Gran <steve@lobefin.net>
Sat, 17 Oct 2009 00:07:55 +0000 (01:07 +0100)
committerStephen Gran <steve@lobefin.net>
Sat, 17 Oct 2009 00:08:02 +0000 (01:08 +0100)
Signed-off-by: Stephen Gran <steve@lobefin.net>
modules/munin-node/manifests/init.pp

index 54f29e9..698899c 100644 (file)
@@ -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"];
+            }
         }
 }