From: Silvio Rhatto Date: Tue, 11 Mar 2014 18:57:13 +0000 (-0300) Subject: Fix munin management when not on main master X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=c09f991dda8ed9024956ec659255d4b82d3b9804;p=puppet-nodo.git Fix munin management when not on main master --- diff --git a/manifests/role/master.pp b/manifests/role/master.pp index a595d9b..29c85ee 100644 --- a/manifests/role/master.pp +++ b/manifests/role/master.pp @@ -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 diff --git a/manifests/subsystem/monitor/master.pp b/manifests/subsystem/monitor/master.pp index 8263a2a..046143b 100644 --- a/manifests/subsystem/monitor/master.pp +++ b/manifests/subsystem/monitor/master.pp @@ -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 {