blob: f5f8d4eaf49aca860c813124cfdfe10db5f1e014 [file] [log] [blame]
Zack Williams99adf6b2016-03-14 17:01:08 -07001;## NSD authoritative only DNS
2;## FORWARD Zone
3
4$ORIGIN {{ item.name }}. ; default zone domain
5$TTL {{ item.ttl | default(dns_ttl) }} ; default time to live
6
7@ IN SOA {{ item.soa }}.{{ item.name }}. admin.{{ item.name }}. (
8 {{ item.serial | default(ansible_date_time.epoch) }} ; Serial, must be incremented every time you change this file
9 3600 ; Refresh [1hr]
10 600 ; Retry [10m]
11 3600 ; Expire [1hr]
12 60 ; Min TTL [1m]
13 )
14
15; Name Servers
16{% for ns in item.ns %}
17 IN NS {{ ns.name ~ '.' ~ item.name }}.
18{% endfor %}
19
20
21{% set nodes = vars[item.nodelist] %}
22
23;A and CNAME records
24{% for node in nodes %}
25{{ node.name }} IN A {{ item.ipv4_first_octets ~ "." ~ node.ipv4_last_octet }}
26{% if node.aliases is defined %}
27{% for alias in node.aliases %}
28{{ alias }} IN CNAME {{ node.name }}
29{% endfor %}
30{% endif %}
31{% endfor %}
32