ansible-role-bind/templates/db.j2

24 lines
954 B
Text
Raw Normal View History

2017-10-08 12:55:01 +00:00
; {{ ansible_managed }}
$TTL {{ item.value.ttl|default(3600) }}
@ IN SOA {{ item.value.ns_primary }}. {{ item.value.mail|replace('@', '.') }}. (
{{ item.value.serial }} ; Serial
{{ item.value.refresh|default(14400) }} ; Refresh
{{ item.value.retry|default(86400) }} ; Retry
{{ item.value.expire|default(2419200) }} ; Expire
{{ item.value.negative_cache|default(86400) }} ; Negative Cache TTL
)
{% for entry in item.value.entries %}
{% if entry.type|upper == 'MX' %}
{{ entry.name }}{% for i in range(0, 15 - entry.name|length) %} {% endfor %} IN MX {{ entry.priority }} {{ entry.value }}
{% else %}
{{ entry.name }}{% for i in range(0, 15 - entry.name|length) %} {% endfor %} IN {{ entry.type|upper }}{% for i in range(0, 9 - entry.type|length) %} {% endfor %} {{ entry.value }}
{% endif %}
{% endfor %}
{% if 'dnssec' in item.value and item.value.dnssec %}
$INCLUDE {{ item.key }}.key
$INCLUDE {{ item.key }}-ksk.key
{% endif %}