From 04d3e0f273815483838504efd66372bc2eff316a Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 7 Mar 2014 17:10:52 -0300 Subject: Manage rrdcached just on main master --- manifests/subsystem/monitor/master.pp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'manifests/subsystem/monitor') diff --git a/manifests/subsystem/monitor/master.pp b/manifests/subsystem/monitor/master.pp index 3ea3e6b..5be7b7e 100644 --- a/manifests/subsystem/monitor/master.pp +++ b/manifests/subsystem/monitor/master.pp @@ -7,17 +7,25 @@ class nodo::subsystem::monitor::master { require => Package['nagios'], } + $main = hiera('nodo::role::master::main', false) + + if $main == true { + $manage = present + } else { + $manage = absent, + } + # # See https://raymii.org/s/tutorials/Munin_optimalization_on_Debian.html # https://munin.readthedocs.org/en/latest/master/rrdcached.html # http://kuszelas.eu/~eyck/log/Howto/Munin.Rrdcached.html # package { 'rrdcached': - ensure => present, + ensure => $manage, } file { '/etc/default/rrdcached': - ensure => present, + ensure => $manage, owner => root, group => root, source => 'puppet:///modules/nodo/etc/default/rrdcached', @@ -26,7 +34,7 @@ class nodo::subsystem::monitor::master { } service { 'rrdcached': - ensure => running, + ensure => $manage, require => [ Package['rrdcached'], User['munin'], Group['munin'] ], } } -- cgit v1.2.3