X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fferm%2Fmanifests%2Finit.pp;h=8d063c87ece32d8a7b9c6e7e74df2d14b0f5391e;hb=1dcae3c99e63e204f5383fb30cbd532b7d09d89e;hp=7ade513118c52703e4fb79896b7cc11950710437;hpb=2bbf27af83a6bd01536e611eee09d7e5023b2305;p=mirror%2Fdsa-puppet.git diff --git a/modules/ferm/manifests/init.pp b/modules/ferm/manifests/init.pp index 7ade51311..8d063c87e 100644 --- a/modules/ferm/manifests/init.pp +++ b/modules/ferm/manifests/init.pp @@ -60,7 +60,7 @@ class ferm { notify => Exec["ferm restart"]; "/etc/logrotate.d/ulogd": source => "puppet:///modules/ferm/logrotate-ulogd", - require => Package["logrotate"], + require => Package["debian.org"], ; } @@ -70,7 +70,32 @@ class ferm { $munin_ips: script => "ip_"; } - case extractnodeinfo($nodeinfo, 'buildd') { + define munin_ipv6_plugin() { + file { + "/etc/munin/plugins/$name": + content => "#!/bin/bash\n# This file is under puppet control\n. /usr/share/munin/plugins/ip_\n", + mode => 555, + notify => Exec["munin-node restart"], + ; + } + } + case $v6ips { + 'no': {} + default: { + $munin6_ips = split(regsubst($v6ips, '([^,]+)', 'ip_\1', 'G'), ',') + munin_ipv6_plugin { + $munin6_ips: ; + } + # get rid of old stuff + $munin6_ip6s = split(regsubst($v6ips, '([^,]+)', 'ip_\1', 'G'), ',') + activate_munin_check { + $munin6_ips: ensure => absent; + } + } + } + + + case getfromhash($nodeinfo, 'buildd') { true: { file { "/etc/ferm/conf.d/load_ftp_conntrack.conf": @@ -81,16 +106,6 @@ class ferm { } } - case $v6ips { - 'no': {} - default: { - $munin6_ips = split(regsubst($v6ips, '([^,]+)', 'ip6_\1', 'G'), ',') - activate_munin_check { - $munin6_ips: script => "ip6_"; - } - } - } - exec { "ferm restart": command => "/etc/init.d/ferm restart",