]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
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 54f29e983d85982f19e3bbc8306be7bca4ecd55a..698899cf8b14dbae6fef5713849dc294484e215d 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"];
+            }
         }
 }