blob: 9f41554a789878c4cba405dc90c3f2e3dac9b7b0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
; -*- mode: dns; -*-
; {{ ansible_managed }}
{% set hostmaster = "hostmaster." + network.domain %}
$ORIGIN {{ domain }}.
$TTL {{ dns.ttl }}
@ IN SOA {{ nameservers[0].ns[0] }}. {{ hostmaster }}. (
{{ domain | next_serial }} ; serial number
{{ dns.refresh }} ; refresh
{{ dns.retry }} ; retry
{{ dns.expire }} ; expire
{{ dns.minimum }} ; minimum
)
{% for server in nameservers %}
{% for ns in server.ns %}
@ IN NS {{ ns }}. ; {{ server.name }}
{% endfor %}
{% endfor %}
@ IN A {{ network.ipv4.address }}
@ IN AAAA {{ network.ipv6.address }}
{% set subdomains = [] %}
{% for name in domains -%}
{%- if name["name"] == domain -%}
{%- for sub in name["sub"] -%}
{{ subdomains.append(sub) }}
{%- endfor -%}
{%- endif -%}
{%- endfor %}
{% for name in subdomains %}
{{ name }} IN CNAME @
{% endfor %}
* IN CNAME @
; vim: set ft=bindzone:
|