aboutsummaryrefslogtreecommitdiff
path: root/manifests/subsystem
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/subsystem')
-rw-r--r--manifests/subsystem/monitor/master.pp14
1 files changed, 11 insertions, 3 deletions
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'] ],
}
}