aboutsummaryrefslogtreecommitdiff
path: root/manifests/subsystem
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2015-10-26 14:47:33 -0200
committerSilvio Rhatto <rhatto@riseup.net>2015-10-26 14:47:33 -0200
commit6625c836593dbbc624965a35ed329eb23d7217ad (patch)
treed5c3a5f0b0fb53f9fae06db40ea35c4b84335573 /manifests/subsystem
parent474a2e9b74bf463eca86daddf9898219f472c1b2 (diff)
downloadpuppet-nodo-6625c836593dbbc624965a35ed329eb23d7217ad.tar.gz
puppet-nodo-6625c836593dbbc624965a35ed329eb23d7217ad.tar.bz2
Adds nodo::munin_node::manage
Diffstat (limited to 'manifests/subsystem')
-rw-r--r--manifests/subsystem/monitor/munin.pp31
1 files changed, 17 insertions, 14 deletions
diff --git a/manifests/subsystem/monitor/munin.pp b/manifests/subsystem/monitor/munin.pp
index a3deb47..c2f461a 100644
--- a/manifests/subsystem/monitor/munin.pp
+++ b/manifests/subsystem/monitor/munin.pp
@@ -1,5 +1,6 @@
# Define a munin node
define nodo::subsystem::monitor::munin(
+ $manage = hiera('nodo::munin_node::manage', True),
$port = hiera('nodo::munin_node::port', '4949'),
$allow = hiera('nodo::munin_node::allow', ''),
$host = hiera('nodo::munin_node::host', $::fqdn),
@@ -7,21 +8,23 @@ define nodo::subsystem::monitor::munin(
$config = hiera('nodo::munin_node::config', [ 'use_node_name yes', 'load.load.warning 5', 'load.load.critical 10' ])
) {
- case $allow {
- '': { fail("Please set nodo::munin_node::allow in your config") }
- }
+ if $manage == true {
+ case $allow {
+ '': { fail("Please set nodo::munin_node::allow in your config") }
+ }
- package { "munin-plugins-extra":
- ensure => "present",
- }
+ package { "munin-plugins-extra":
+ ensure => "present",
+ }
- class { 'munin::client':
- port => $port,
- allow => $allow,
- host => $host,
- listen => $listen,
- config => $config,
- }
+ class { 'munin::client':
+ port => $port,
+ allow => $allow,
+ host => $host,
+ listen => $listen,
+ config => $config,
+ }
- munin::plugin { apt_all: ensure => present; }
+ munin::plugin { apt_all: ensure => present; }
+ }
}