rename interfaces to 50-munin-interfaces
authorPeter Palfrader <peter@palfrader.org>
Tue, 30 Oct 2018 09:17:50 +0000 (10:17 +0100)
committerPeter Palfrader <peter@palfrader.org>
Tue, 30 Oct 2018 09:17:50 +0000 (10:17 +0100)
modules/ferm/manifests/init.pp
modules/ferm/templates/conf.d-munin-interfaces.conf.erb [new file with mode: 0644]
modules/ferm/templates/interfaces.conf.erb [deleted file]

index e23e15d..a912a28 100644 (file)
@@ -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 (file)
index 0000000..f017050
--- /dev/null
@@ -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 (file)
index f017050..0000000
+++ /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; } }