blob: 1ebdcd3b8933702390e826f263fef7e380d113d9 [file] [log] [blame]
Zack Williams99adf6b2016-03-14 17:01:08 -07001;## NSD authoritative only DNS
2;## REVERSE Zone for {{ item.name }}
Zack Williamsba5549c2017-03-25 15:04:45 -07003;# created by ansible
Zack Williams99adf6b2016-03-14 17:01:08 -07004
5$ORIGIN {{ item.name }}. ; default zone domain
6$TTL {{ item.ttl | default(dns_ttl) }} ; default time to live
7
Zack Williams99adf6b2016-03-14 17:01:08 -07008{{ (item.ipv4_first_octets ~ ".0") | ipaddr('revdns') | regex_replace('^0\.','') }} IN SOA {{ item.soa }}.{{ item.name }}. admin.{{ item.name }}. (
9 {{ item.serial | default(ansible_date_time.epoch) }} ; Serial, must be incremented every time you change this file
10 3600 ; Refresh [1hr]
11 600 ; Retry [10m]
12 3600 ; Expire [1hr]
13 60 ; Min TTL [1m]
14 )
15
Zack Williamsba5549c2017-03-25 15:04:45 -070016; -- PTR records --
Zack Williams99adf6b2016-03-14 17:01:08 -070017
Zack Williamsba5549c2017-03-25 15:04:45 -070018{% for nodelist in item.nodelists %}
19; Created from nodelist: {{ nodelist }}
20{% set nodes = vars[nodelist] %}
Zack Williams99adf6b2016-03-14 17:01:08 -070021{% for node in nodes %}
22{{ (item.ipv4_first_octets ~ "." ~ node.ipv4_last_octet) | ipaddr('revdns') }} IN PTR {{ node.name }}
23{% endfor %}
Zack Williamsba5549c2017-03-25 15:04:45 -070024{% endfor %}
25