{% for domaene in domaenen|dictsort -%} #view for (broadcast-)domain domaene-{{domaene[0]}} view "domaene-{{domaene[0]}}" { match-clients { {{domaene[1].ffv4_network}}; {{domaene[1].ffv6_network}}; }; include "/etc/bind/named.conf.tld"; include "/etc/bind/named.conf.local"; include "/etc/bind/named.conf.default-zones"; zone "servers.{{freifunk.kurzname}}." { type master; file "/etc/bind/db.servers.ffnet"; allow-transfer { {{domaene[1].ffv4_network | ipsubnet(28,0)}}; }; }; zone "services.{{freifunk.kurzname}}." { type master; file "/etc/bind/db.services.ffnet"; allow-transfer { {{domaene[1].ffv4_network | ipsubnet(28,0)}}; }; }; }; {% endfor %} #fallback/legacy view view "external-view" { match-clients { any; {% for domaene in domaenen|dictsort %} !{{domaene[1].ffv4_network}}; !{{domaene[1].ffv6_network}}; {% endfor %} }; include "/etc/bind/named.conf.tld"; include "/etc/bind/named.conf.local"; include "/etc/bind/named.conf.default-zones"; };