Zack Williams | 99adf6b | 2016-03-14 17:01:08 -0700 | [diff] [blame] | 1 | ;## NSD authoritative only DNS |
| 2 | ;## REVERSE Zone for {{ item.name }} |
| 3 | |
| 4 | $ORIGIN {{ item.name }}. ; default zone domain |
| 5 | $TTL {{ item.ttl | default(dns_ttl) }} ; default time to live |
| 6 | |
| 7 | |
| 8 | {{ (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 | |
| 16 | {% set nodes = vars[item.nodelist] %} |
| 17 | |
| 18 | ;PTR records |
| 19 | {% for node in nodes %} |
| 20 | {{ (item.ipv4_first_octets ~ "." ~ node.ipv4_last_octet) | ipaddr('revdns') }} IN PTR {{ node.name }} |
| 21 | {% endfor %} |