Commit 84bd4fbc authored by HellMar's avatar HellMar

ipv4 für DNS aus gleichnamiger Variable statt aus ansible_ssh_host

parent fa810c76
......@@ -14,25 +14,25 @@ $TTL 3600
{% endif %}
{% endfor %}
{% for host in groups['gateways']+groups['hypervisors'] %}
{{host}} IN A {{hostvars[host].ansible_ssh_host}};
{{host}} IN A {{hostvars[host].ipv4}};
{{host}} IN AAAA {{hostvars[host].ipv6}};
{% endfor %}
{% for host in groups['gateways'] %}
{% if hostvars[host].domaenenliste is defined %}
{% for domaene in hostvars[host].domaenenliste|dictsort %}
domaene{{domaene[0]}} IN A {{hostvars[host].ansible_ssh_host}};
domaene{{domaene[0]}} IN A {{hostvars[host].ipv4}};
domaene{{domaene[0]}} IN AAAA {{hostvars[host].ipv6}};
{% if domaene[1].server_id is defined and domaene[1].server_id == 2 %}
domaene{{domaene[0]}}-A IN A {{hostvars[host].ansible_ssh_host}};
domaene{{domaene[0]}}-A IN A {{hostvars[host].ipv4}};
domaene{{domaene[0]}}-A IN AAAA {{hostvars[host].ipv6}};
{% elif domaene[1].server_id is defined and domaene[1].server_id == 3 %}
domaene{{domaene[0]}}-B IN A {{hostvars[host].ansible_ssh_host}};
domaene{{domaene[0]}}-B IN A {{hostvars[host].ipv4}};
domaene{{domaene[0]}}-B IN AAAA {{hostvars[host].ipv6}};
{% elif domaene[1].server_id is defined and domaene[1].server_id == 4 %}
domaene{{domaene[0]}}-C IN A {{hostvars[host].ansible_ssh_host}};
domaene{{domaene[0]}}-C IN A {{hostvars[host].ipv4}};
domaene{{domaene[0]}}-C IN AAAA {{hostvars[host].ipv6}};
{% elif domaene[1].server_id is defined and domaene[1].server_id == 5 %}
domaene{{domaene[0]}}-D IN A {{hostvars[host].ansible_ssh_host}};
domaene{{domaene[0]}}-D IN A {{hostvars[host].ipv4}};
domaene{{domaene[0]}}-D IN AAAA {{hostvars[host].ipv6}};
{% endif %}
{% endfor %}
......
......@@ -14,7 +14,7 @@ view "domaene-{{domaene[0]}}" {
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";
{% if is_external_nameserver is defined and is_external_nameserver %}
include "/etc/bind/named.conf.tld";
# include "/etc/bind/named.conf.tld";
{% endif %}
zone "{{freifunk.kurzname}}." {
type master;
......
// {{ ansible_managed }}
options {
directory "/var/cache/bind";
directory "/var/cache/bind";
dnssec-validation auto;
recursion yes;
allow-recursion {
localhost;
dnssec-validation auto;
recursion yes;
allow-recursion {
localhost;
{% if domaenenliste is defined %}
{% for domaene in domaenenliste|dictsort %}
{{domaenen[domaene[0]].ffv4_network}};
{{domaenen[domaene[0]].ffv6_network}};
{{domaenen[domaene[0]].ffv4_network}};
{{domaenen[domaene[0]].ffv6_network}};
{% endfor %}
{% endif %}
};
};
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
minimal-responses yes;
tcp-clients 1000;
recursive-clients 10000;
rrset-order { order random; };
rrset-order { order random; };
};
{% if collectd is defined and collectd.collect_bind %}
statistics-channels {
inet 127.0.0.1 port 8053 allow { 127.0.0.1; };
inet 127.0.0.1 port 8053 allow { 127.0.0.1; };
};
{% endif %}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment