From: Stephen Gran Date: Thu, 3 May 2012 06:45:39 +0000 (+0100) Subject: scope fixes X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=38339aa5456ff34cbc8bb5ba8b7690799d341d48;p=dsa-puppet.git scope fixes Signed-off-by: Stephen Gran --- diff --git a/modules/ferm/manifests/init.pp b/modules/ferm/manifests/init.pp index 03025d53..904d83a9 100644 --- a/modules/ferm/manifests/init.pp +++ b/modules/ferm/manifests/init.pp @@ -24,17 +24,17 @@ class ferm { status => '/bin/true', } - $munin_ips = split(regsubst($v4ips, '([^,]+)', 'ip_\1', 'G'), ',') + $munin_ips = split(regsubst($::v4ips, '([^,]+)', 'ip_\1', 'G'), ',') munin::check { $munin_ips: script => 'ip_', } if $v6ips { - $munin6_ips = split(regsubst($v6ips, '([^,]+)', 'ip_\1', 'G'), ',') + $munin6_ips = split(regsubst($::v6ips, '([^,]+)', 'ip_\1', 'G'), ',') munin::ipv6check { $munin6_ips: } } # get rid of old stuff - $munin6_ip6s = split(regsubst($v6ips, '([^,]+)', 'ip6_\1', 'G'), ',') + $munin6_ip6s = split(regsubst($::v6ips, '([^,]+)', 'ip6_\1', 'G'), ',') munin::check { $munin6_ip6s: ensure => absent } file { '/etc/ferm': diff --git a/modules/ferm/templates/interfaces.conf.erb b/modules/ferm/templates/interfaces.conf.erb index fbe96026..496054c4 100644 --- a/modules/ferm/templates/interfaces.conf.erb +++ b/modules/ferm/templates/interfaces.conf.erb @@ -1,13 +1,13 @@ def $MUNIN_IPS = (<%= begin - v4ips.split(',').join(' ') + scope.lookupvar('::v4ips').split(',').join(' ') rescue '' end %>); def $MUNIN6_IPS = (<%= begin - v6ips == '' ? '' : v6ips.split(',').join(' ') + scope.lookupvar('::v6ips') == '' ? '' : scope.lookupvar('::v6ips').split(',').join(' ') rescue '' end