munin: Also allow forcefully disabling plugins
This commit is contained in:
parent
6cd511d77f
commit
e948ce5cfd
1 changed files with 8 additions and 1 deletions
|
@ -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"],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue