From: Peter Palfrader Date: Tue, 30 Oct 2018 09:17:50 +0000 (+0100) Subject: rename interfaces to 50-munin-interfaces X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;ds=inline;h=285329e7458a2ef552135d8f5002eadd81a29806;p=mirror%2Fdsa-puppet.git rename interfaces to 50-munin-interfaces --- diff --git a/modules/ferm/manifests/init.pp b/modules/ferm/manifests/init.pp index e23e15d96..a912a281f 100644 --- a/modules/ferm/manifests/init.pp +++ b/modules/ferm/manifests/init.pp @@ -82,8 +82,8 @@ class ferm { content => template('ferm/defs.conf.erb'), notify => Service['ferm'], } - file { '/etc/ferm/conf.d/interfaces.conf': - content => template('ferm/interfaces.conf.erb'), + file { '/etc/ferm/conf.d/50-munin-interfaces.conf': + content => template('ferm/conf.d-munin-interfaces.conf.erb'), notify => Service['ferm'], } augeas { 'logrotate_ulogd2': diff --git a/modules/ferm/templates/conf.d-munin-interfaces.conf.erb b/modules/ferm/templates/conf.d-munin-interfaces.conf.erb new file mode 100644 index 000000000..f01705098 --- /dev/null +++ b/modules/ferm/templates/conf.d-munin-interfaces.conf.erb @@ -0,0 +1,17 @@ +def $MUNIN_IPS = (<%= +begin + scope.lookupvar('site::nodeinfo')['misc']['v4addrs'].join(' ') +rescue + '' +end +%>); +def $MUNIN_IPS = ($MUNIN_IPS <%= +begin + scope.lookupvar('site::nodeinfo')['misc']['v6addrs'].join(' ') +rescue + '' +end +%>); + +domain (ip ip6) { chain INPUT { daddr ($MUNIN_IPS) NOP; } } +domain (ip ip6) { chain OUTPUT { saddr ($MUNIN_IPS) NOP; } } diff --git a/modules/ferm/templates/interfaces.conf.erb b/modules/ferm/templates/interfaces.conf.erb deleted file mode 100644 index f01705098..000000000 --- a/modules/ferm/templates/interfaces.conf.erb +++ /dev/null @@ -1,17 +0,0 @@ -def $MUNIN_IPS = (<%= -begin - scope.lookupvar('site::nodeinfo')['misc']['v4addrs'].join(' ') -rescue - '' -end -%>); -def $MUNIN_IPS = ($MUNIN_IPS <%= -begin - scope.lookupvar('site::nodeinfo')['misc']['v6addrs'].join(' ') -rescue - '' -end -%>); - -domain (ip ip6) { chain INPUT { daddr ($MUNIN_IPS) NOP; } } -domain (ip ip6) { chain OUTPUT { saddr ($MUNIN_IPS) NOP; } }