From e948ce5cfdc2ed77fb458748842902c2cff0e5e7 Mon Sep 17 00:00:00 2001 From: Ossi Salmi Date: Mon, 27 Oct 2014 14:09:01 +0200 Subject: [PATCH] munin: Also allow forcefully disabling plugins --- munin/manifests/init.pp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/munin/manifests/init.pp b/munin/manifests/init.pp index 455cb9f..4ce55dc 100644 --- a/munin/manifests/init.pp +++ b/munin/manifests/init.pp @@ -152,7 +152,7 @@ define munin::snmpnode($snmp_community="public", $snmp_version="2") { # $enable: # Set to false to disable plugin. # $force: -# Skip munin-node-configure and always enable plugin if true. +# Skip munin-node-configure and always enable or disable plugin. # Defaults to false. # $source: # Source path of the plugin. @@ -239,6 +239,13 @@ define munin::plugin( notify => $notify, require => Package["munin-node"], } + if $force == true { + file { "/etc/munin/plugins/${name}": + ensure => absent, + require => Exec["munin-node-configure"], + notify => Service["munin-node"], + } + } } }