feat: add ttl for record
This commit is contained in:
parent
5634103cfd
commit
a46f82ba2c
3 changed files with 5 additions and 5 deletions
|
@ -41,7 +41,7 @@ bind_zones:
|
||||||
dnssec: yes
|
dnssec: yes
|
||||||
entries:
|
entries:
|
||||||
- { name: '@', type: ns, value: localhost. }
|
- { name: '@', type: ns, value: localhost. }
|
||||||
- { name: hello, type: a, value: 1.2.3.4 }
|
- { name: hello, type: a, ttl: 5m, value: 1.2.3.4 }
|
||||||
hello.local:
|
hello.local:
|
||||||
ns_primary: ns1.hello.local
|
ns_primary: ns1.hello.local
|
||||||
mail: root@hello.local
|
mail: root@hello.local
|
||||||
|
|
|
@ -11,15 +11,15 @@ $TTL {{ item.value.ttl|default(3600) }}
|
||||||
|
|
||||||
{% for entry in item.value.entries %}
|
{% for entry in item.value.entries %}
|
||||||
{% if entry.type|upper == 'MX' %}
|
{% if entry.type|upper == 'MX' %}
|
||||||
{{ entry.name }}{% for i in range(0, 15 - entry.name|length) %} {% endfor %} IN MX {{ entry.priority }} {{ entry.value }}
|
{{ entry.name }} {{ entry.ttl|default(' ') }} IN MX {{ entry.priority }} {{ entry.value }}
|
||||||
{% elif entry.type|upper == 'TXT' %}
|
{% elif entry.type|upper == 'TXT' %}
|
||||||
{{ entry.name }}{% for i in range(0, 15 - entry.name|length) %} {% endfor %} IN {{ entry.type|upper }} (
|
{{ entry.name }} {{ entry.ttl|default(' ') }} IN {{ entry.type|upper }} (
|
||||||
{% for charset in entry.value|batch(64) %}
|
{% for charset in entry.value|batch(64) %}
|
||||||
"{{ charset|join('') }}"
|
"{{ charset|join('') }}"
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
)
|
)
|
||||||
{% else %}
|
{% 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 }}
|
{{ entry.name }} {{ entry.ttl|default(' ') }} IN {{ entry.type|upper }} {{ entry.value }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% if 'dnssec' in item.value and item.value.dnssec %}
|
{% if 'dnssec' in item.value and item.value.dnssec %}
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
entries:
|
entries:
|
||||||
- { name: '@', type: mx, priority: 20, value: mail.test.local. }
|
- { name: '@', type: mx, priority: 20, value: mail.test.local. }
|
||||||
- { name: '@', type: ns, value: localhost. }
|
- { name: '@', type: ns, value: localhost. }
|
||||||
- { name: hello, type: a, value: 1.2.3.4 }
|
- { name: hello, type: a, ttl: 5m, value: 1.2.3.4 }
|
||||||
hello.local:
|
hello.local:
|
||||||
ns_primary: ns1.hello.local
|
ns_primary: ns1.hello.local
|
||||||
mail: root@hello.local
|
mail: root@hello.local
|
||||||
|
|
Loading…
Reference in a new issue