]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - modules/munin-node/manifests/init.pp
this should virtually work
[dsa-puppet.git] / modules / munin-node / manifests / init.pp
index 5b61d16783f48db779743bc60aa183994f4dc1cb..5ddbf6eb3d86c1150cf5f08719be8bf94c14effe 100644 (file)
@@ -1,13 +1,13 @@
-define activate_munin_check($ensure=present, $script=$name) {
+define activate_munin_check($ensure=present, $script = none) {
     case $script {
-        "": { $base = $name }
-        default: { $base = $script }
+        none: { $link = $name }
+        default: { $link = $script }
     }
 
     case $ensure {
         present: {
             file { "/etc/munin/plugins/$name":
-                     ensure => "/usr/share/munin/plugins/$base",
+                     ensure => "/usr/share/munin/plugins/$link",
                      notify => Exec["munin-node restart"];
             }
         }
@@ -75,10 +75,9 @@ class munin-node {
         path        => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
         refreshonly => true,
     }
-    ferm::rule { "dsa-munin":
-        description     => "Allow munin-node from spohr.debian.org",
-        rule            => "proto tcp dport 4949 saddr $HOST_MUNIN ACCEPT"
-       prio            => "02"
-   }
+    @ferm::rule { "dsa-munin":
+            description     => "Allow munin from munin master",
+            rule            => "proto tcp mod state state (NEW) dport (munin) @subchain 'munin' { saddr (\$HOST_MUNIN) ACCEPT; }"
+    }
 }