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