aboutsummaryrefslogtreecommitdiff
path: root/manifests/vserver.pp
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2009-12-26 16:35:44 -0200
committerSilvio Rhatto <rhatto@riseup.net>2009-12-26 16:35:44 -0200
commit5c3cf0ce7dedd4b6fb1b825165e69e106a3567b6 (patch)
tree41cc9d2b0ae60d99668aef211a120b626dd436a8 /manifests/vserver.pp
parentbb323275ceedde5655d31e335bf799b1fa88521c (diff)
downloadpuppet-virtual-5c3cf0ce7dedd4b6fb1b825165e69e106a3567b6.tar.gz
puppet-virtual-5c3cf0ce7dedd4b6fb1b825165e69e106a3567b6.tar.bz2
Setup plugins just if munin is enabled in the system (2)
Diffstat (limited to 'manifests/vserver.pp')
-rw-r--r--manifests/vserver.pp30
1 files changed, 18 insertions, 12 deletions
diff --git a/manifests/vserver.pp b/manifests/vserver.pp
index fe4a822..dbe4f86 100644
--- a/manifests/vserver.pp
+++ b/manifests/vserver.pp
@@ -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