1
0
Fork 0
mirror of https://github.com/Luzifer/dns.git synced 2024-11-09 22:50:06 +00:00
dns/zone_template.j2
Knut Ahlers 3cbf555584
Ensure stable sorting in zone files
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2018-02-18 13:47:31 +01:00

18 lines
690 B
Django/Jinja

; Auto-generated using generateZonefiles.py
$ORIGIN {{ zone }}.
$TTL {{ ttl }}
{{ zone }}. {{ ttl }} IN SOA {{ soa.auth_ns }} {{ soa.contact }} {{ soa.serial }} {{ soa.refresh }} {{ soa.retry }} {{ soa.expire }} {{ soa.ttl }}
{% for ns in nameserver -%}
{{ zone }}. {{ ttl }} IN NS {{ ns }}
{% endfor %}
{%- if mailserver | length > 0 %}
{% for mailserver, weight in mailserver | dictsort -%}
{{ zone }}. {{ ttl }} IN MX {{ weight }} {{ mailserver }}
{% endfor -%}
{%- endif %}
{% for entry in entries -%}
{{ entry.name }} {{ entry.ttl | default(ttl) }} {{ entry.class | default('IN') }} {{ entry.type }} {% if entry.weight %}{{ entry.weight }} {% endif %}{{ entry.data }}
{% endfor -%}