blob: 1ddf7ba19443d563afb3f263789872e3a9d0d3de [file] [log] [blame]
Matteo Scandolo3896c472017-08-01 13:31:42 -07001
2{#
3Copyright 2017-present Open Networking Foundation
4
5Licensed under the Apache License, Version 2.0 (the "License");
6you may not use this file except in compliance with the License.
7You may obtain a copy of the License at
8
9http://www.apache.org/licenses/LICENSE-2.0
10
11Unless required by applicable law or agreed to in writing, software
12distributed under the License is distributed on an "AS IS" BASIS,
13WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14See the License for the specific language governing permissions and
15limitations under the License.
16#}
17
18
Zack Williams99adf6b2016-03-14 17:01:08 -070019;## NSD authoritative only DNS
20;## REVERSE Zone for {{ item.name }}
Zack Williamsba5549c2017-03-25 15:04:45 -070021;# created by ansible
Zack Williams99adf6b2016-03-14 17:01:08 -070022
23$ORIGIN {{ item.name }}. ; default zone domain
24$TTL {{ item.ttl | default(dns_ttl) }} ; default time to live
25
Zack Williams99adf6b2016-03-14 17:01:08 -070026{{ (item.ipv4_first_octets ~ ".0") | ipaddr('revdns') | regex_replace('^0\.','') }} IN SOA {{ item.soa }}.{{ item.name }}. admin.{{ item.name }}. (
27 {{ item.serial | default(ansible_date_time.epoch) }} ; Serial, must be incremented every time you change this file
28 3600 ; Refresh [1hr]
29 600 ; Retry [10m]
30 3600 ; Expire [1hr]
31 60 ; Min TTL [1m]
32 )
33
Zack Williamsba5549c2017-03-25 15:04:45 -070034; -- PTR records --
Zack Williams99adf6b2016-03-14 17:01:08 -070035
Zack Williamsba5549c2017-03-25 15:04:45 -070036{% for nodelist in item.nodelists %}
37; Created from nodelist: {{ nodelist }}
38{% set nodes = vars[nodelist] %}
Zack Williams99adf6b2016-03-14 17:01:08 -070039{% for node in nodes %}
40{{ (item.ipv4_first_octets ~ "." ~ node.ipv4_last_octet) | ipaddr('revdns') }} IN PTR {{ node.name }}
41{% endfor %}
Zack Williamsba5549c2017-03-25 15:04:45 -070042{% endfor %}
43