- name: Gather facts of all public available hosts hosts: public_available gather_facts: yes - name: Configure nvak as dns server hosts: nvak.banananet.work vars: nvak_dns_slaves: [] roles: - role: dns/master domain: banananet.work main_nameserver_domain: ns1.banananet.work. responsible_mail_name: admin.banananet.work. slaves: "{{ nvak_dns_slaves }}" entries: | ; Name Servers @ IN NS ns1 ns1 IN A {{ ansible_default_ipv4.address }} ns1 IN AAAA {{ ansible_default_ipv6.address }} ; Automatic server addresses {% for fqdn in groups['public_available'] %} {{ fqdn }}. IN A {{ hostvars[fqdn].ansible_default_ipv4.address }} {{ fqdn }}. IN AAAA {{ hostvars[fqdn].ansible_default_ipv6.address }} {{ lookup('pipe', global_public_key_directory|quote + '/ssh_dns_fp.py --host ' + fqdn|quote) }} {% endfor %} ; Public use domains @ IN A {{ ansible_default_ipv4.address }} @ IN AAAA {{ ansible_default_ipv6.address }} auth IN CNAME nvak cloud IN CNAME nvak drop IN CNAME nvak test.cloud IN CNAME nvak dsa IN CNAME nvak firefox IN CNAME nvak git IN CNAME nvak keys IN CNAME rurapenthe rss IN CNAME nvak spotme IN CNAME nvak wg IN CNAME nvak _minecraft._tcp.wg IN SRV 10 10 25565 mc.wg mc.wg IN A 85.131.171.106 _minecraft._tcp.mc.wg IN SRV 10 10 25565 mc.wg ; Mail @ IN MX 10 nvak @ IN TXT "v=spf1 +mx -all" mail IN CNAME nvak imap IN CNAME nvak smtp IN CNAME nvak - role: dns/master domain: forumderschan.de main_nameserver_domain: ns1.banananet.work. responsible_mail_name: admin.banananet.work. slaves: "{{ nvak_dns_slaves }}" entries: | ; Name Servers @ IN NS ns1.banananet.work. @ IN NS ns2.banananet.work. ; WebPage @ IN A {{ ansible_default_ipv4.address }} @ IN AAAA {{ ansible_default_ipv6.address }} www IN A {{ ansible_default_ipv4.address }} www IN AAAA {{ ansible_default_ipv6.address }} ; Mail @ IN MX 10 nvak @ IN TXT "v=spf1 +mx -all" - role: dns/master domain: stadtpiraten-karlsruhe.de main_nameserver_domain: ns1.banananet.work. resposible_mail_name: admin.banananet.work. slaves: "{{ nvak_dns_slaves }}" entries: | ; Name Servers @ IN NS ns1.banananet.work. @ IN NS ns2.banananet.work. ; WebPages @ IN A {{ ansible_default_ipv4.address }} @ IN AAAA {{ ansible_default_ipv6.address }} www IN A {{ ansible_default_ipv4.address }} www IN AAAA {{ ansible_default_ipv6.address }} forum IN A {{ ansible_default_ipv4.address }} forum IN AAAA {{ ansible_default_ipv6.address }} ; Mail @ IN MX 10 nvak @ IN TXT "v=spf1 +mx -all"