X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fmunin-node%2Fmanifests%2Finit.pp;h=5ddbf6eb3d86c1150cf5f08719be8bf94c14effe;hb=06f8e083701d1c0886668573295fa2dc7bb7980c;hp=9b40cf965cf648320682e9a6cd0af85f377d3e74;hpb=d84d5dd1f67e16cf54c531cab8cd267bdfd97429;p=mirror%2Fdsa-puppet.git diff --git a/modules/munin-node/manifests/init.pp b/modules/munin-node/manifests/init.pp index 9b40cf965..5ddbf6eb3 100644 --- a/modules/munin-node/manifests/init.pp +++ b/modules/munin-node/manifests/init.pp @@ -1,13 +1,13 @@ -define activate_munin_check($ensure=present, $script=$name) { +define activate_munin_check($ensure=present, $script = none) { case $script { - "": { $base = $name } - default: { $base = $script } + none: { $link = $name } + default: { $link = $script } } case $ensure { present: { file { "/etc/munin/plugins/$name": - ensure => "/usr/share/munin/plugins/$base", + ensure => "/usr/share/munin/plugins/$link", notify => Exec["munin-node restart"]; } } @@ -75,14 +75,9 @@ class munin-node { path => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin", refreshonly => true, } - case $ferm { - "true": { - ferm::rule { "dsa-munin": - description => "Allow munin-node from spohr.debian.org", - rule => 'proto tcp dport 4949 saddr $HOST_MUNIN ACCEPT', - prio => "02" - } - } - } + @ferm::rule { "dsa-munin": + description => "Allow munin from munin master", + rule => "proto tcp mod state state (NEW) dport (munin) @subchain 'munin' { saddr (\$HOST_MUNIN) ACCEPT; }" + } }