From fa6f884b93be0741065adb5ba1c0de277e04d01f Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Fri, 10 Feb 2012 01:34:48 +0100 Subject: [PATCH] Make ipv6 munin things work --- modules/ferm/manifests/init.pp | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/modules/ferm/manifests/init.pp b/modules/ferm/manifests/init.pp index a6dcf1e70..c52fa5eb7 100644 --- a/modules/ferm/manifests/init.pp +++ b/modules/ferm/manifests/init.pp @@ -70,6 +70,26 @@ class ferm { $munin_ips: script => "ip_"; } + 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: ; + } + } + } + + case getfromhash($nodeinfo, 'buildd') { true: { file { @@ -81,16 +101,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", -- 2.20.1