confine ip addr fact to linux
[mirror/dsa-puppet.git] / modules / ferm / templates / interfaces.conf.erb
index 0b575d4..82bdb09 100644 (file)
@@ -1,9 +1,13 @@
-def $MUNIN_IFS = (<%=
-ifs = []
-interfaces.split(',').each do |iface|
-  next unless Kernel.global_variables.include?("ipaddress_" + iface)
-  ifs << iface
-end
-ifs.join(' ')
-%>);
+def $MUNIN_IPS = (<%= v4ips.split(',').join(' ') %>);
 
+domain ip {
+        chain INPUT {
+               daddr ($MUNIN_IPS) NOP;
+        }
+}
+
+domain ip {
+        chain OUTPUT {
+               saddr ($MUNIN_IPS) NOP;
+        }
+}