]> gitweb.fluxo.info Git - puppet-nodo.git/commitdiff
Fix munin management when not on main master
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 11 Mar 2014 18:57:13 +0000 (15:57 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 11 Mar 2014 18:57:13 +0000 (15:57 -0300)
manifests/role/master.pp
manifests/subsystem/monitor/master.pp

index a595d9b9b69883e5fde8b75636ffbf409f6bd4c4..29c85ee326555b0b7393ead8cb77c5c65e9091dd 100644 (file)
@@ -32,6 +32,11 @@ class nodo::role::master {
     host { "puppet":
       ensure => absent,
     }
+
+    # Quick and dirty way to keep munin disabled
+    package { 'munin':
+      ensure => purged,
+    }
   }
 
   # These should be included after puppetmaster
index 8263a2a460e0e9ae68d7b8f28293584d4d4e46c9..046143b99b5083fb3eb2eafb9576d33764b32b8f 100644 (file)
@@ -18,7 +18,10 @@ class nodo::subsystem::monitor::master {
     ensure  => $ensure,
     path    => "/var/lib/puppet/modules/munin/nodes/00-performance",
     content => "max_graph_jobs 1\n max_cgi_graph_jobs 1\nfork no\n",
-    require => Concatenated_file['/etc/munin/munin.conf'],
+    require => $main ? {
+      true    => Concatenated_file['/etc/munin/munin.conf'],
+      default => undef,
+    },
   }
 
   #
@@ -48,7 +51,10 @@ class nodo::subsystem::monitor::master {
     ensure  => $ensure,
     path    => "/var/lib/puppet/modules/munin/nodes/00-rrdcache",
     content => "rrdcached_socket /var/run/rrdcached.sock\n",
-    require => Concatenated_file['/etc/munin/munin.conf'],
+    require => $main ? {
+      true    => Concatenated_file['/etc/munin/munin.conf'],
+      default => undef,
+    },
   }
 
   if $main == true {