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"], + } + } } }