1
0
Fork 0
mirror of https://github.com/Luzifer/dns.git synced 2024-12-22 19:01:20 +00:00
dns/zone_template.j2
Knut Ahlers c53cfe7330
Add zone file generator
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2018-02-05 07:03:08 +01:00

18 lines
687 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.items() -%}
{{ 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 -%}