]> gitweb.fluxo.info Git - puppet-virtual.git/commitdiff
Setup plugins just if munin is enabled in the system (2)
authorSilvio Rhatto <rhatto@riseup.net>
Sat, 26 Dec 2009 18:35:44 +0000 (16:35 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Sat, 26 Dec 2009 18:35:44 +0000 (16:35 -0200)
manifests/vserver.pp

index fe4a822483ce328ef0f79b8215efd6ef535aa0e1..dbe4f86469f33116a31dbf16ccf7e4359033b5f8 100644 (file)
@@ -56,18 +56,24 @@ class vserver::host {
     "/etc/modprobe.d/local-dummy":
       ensure => absent,
       mode => 0644, owner => root, group => root;
-        
-    "/usr/local/share/munin-plugins/vserver_resources":
-      source => "puppet://$server/virtual/munin/vserver_resources",
-      mode => 0755, owner => root, group => root;
-    
-    "/usr/local/share/munin-plugins/vserver_cpu_":
-      source => "puppet://$server/virtual/munin/vserver_cpu_",
-      mode => 0755, owner => root, group => root;
-    
-    "/usr/local/share/munin-plugins/vserver_loadavg":
-      source => "puppet://$server/virtual/munin/vserver_loadavg",
-      mode => 0755, owner => root, group => root;
+   }
+
+  # Setup some plugins if munin is enabled in the system
+  case $munin_cidr_allow {
+    '': {}
+    default: {
+      file {
+        "/usr/local/share/munin-plugins/vserver_resources":
+          source => "puppet://$server/virtual/munin/vserver_resources",
+          mode => 0755, owner => root, group => root;
+
+        "/usr/local/share/munin-plugins/vserver_cpu_":
+          source => "puppet://$server/virtual/munin/vserver_cpu_",
+          mode => 0755, owner => root, group => root;
+
+        "/usr/local/share/munin-plugins/vserver_loadavg":
+          source => "puppet://$server/virtual/munin/vserver_loadavg",
+          mode => 0755, owner => root, group => root;
   }
   
   # Setup some plugins if munin is enabled in the system