this might be more clever
[mirror/dsa-puppet.git] / modules / munin-node / manifests / init.pp
index 7f464ba..0fc6d1e 100644 (file)
@@ -1,18 +1,23 @@
+define activate_munin_check($name) {
+       file { "/etc/munin/plugins/$name":
+                ensure => "/usr/share/munin/plugins/$name",
+                notify => Exec["munin-node restart"];
+        }
+}
+
 class munin-node {
 
-    package { munin-node: ensure => latest }
+    package { munin-node: ensure => installed }
 
     file { "/etc/munin/munin-node.conf":
-        owner   => root,
-        group   => root,
-        mode    => 664,
-        source  => "puppet:///munin-node/munin-node.conf",
+        source  => [ "puppet:///munin-node/per-host/$fqdn/munin-node.conf",
+                     "puppet:///munin-node/common/munin-node.conf" ],
         require => Package["munin-node"],
         notify  => Exec["munin-node restart"],
     }
 
     exec { "munin-node restart":
-        path        => "/etc/init.d/",
+        path        => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
         refreshonly => true,
     }
 }