mirror of
https://github.com/Luzifer/dns.git
synced 2024-12-22 19:01:20 +00:00
Ensure stable sorting in zone files
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
336932ad81
commit
3cbf555584
2 changed files with 3 additions and 1 deletions
|
@ -99,6 +99,8 @@ def sanitize(entry):
|
||||||
|
|
||||||
result.append(new_entry)
|
result.append(new_entry)
|
||||||
|
|
||||||
|
result.sort(key=lambda k: k['data'])
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ $TTL {{ ttl }}
|
||||||
{{ zone }}. {{ ttl }} IN NS {{ ns }}
|
{{ zone }}. {{ ttl }} IN NS {{ ns }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{%- if mailserver | length > 0 %}
|
{%- if mailserver | length > 0 %}
|
||||||
{% for mailserver, weight in mailserver.items() -%}
|
{% for mailserver, weight in mailserver | dictsort -%}
|
||||||
{{ zone }}. {{ ttl }} IN MX {{ weight }} {{ mailserver }}
|
{{ zone }}. {{ ttl }} IN MX {{ weight }} {{ mailserver }}
|
||||||
{% endfor -%}
|
{% endfor -%}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
Loading…
Reference in a new issue