chore: rename entries by records

This commit is contained in:
Adrien Waksberg 2018-03-17 11:07:20 +01:00
parent e1c2f18be1
commit ce7777f279
3 changed files with 13 additions and 13 deletions

View file

@ -39,7 +39,7 @@ bind_zones:
mail: root@test.local mail: root@test.local
serial: 2017092202 serial: 2017092202
dnssec: yes dnssec: yes
entries: records:
- { name: '@', type: ns, value: localhost. } - { name: '@', type: ns, value: localhost. }
- { name: hello, type: a, ttl: 5m, value: 1.2.3.4 } - { name: hello, type: a, ttl: 5m, value: 1.2.3.4 }
- { name: hello, type: caa, flag: 0, tag: issue, value: letsencrypt.org } - { name: hello, type: caa, flag: 0, tag: issue, value: letsencrypt.org }
@ -48,7 +48,7 @@ bind_zones:
mail: root@hello.local mail: root@hello.local
serial: 2017092201 serial: 2017092201
dnssec: no dnssec: no
entries: records:
- { name: '@', type: ns, value: localhost. } - { name: '@', type: ns, value: localhost. }
- { name: hello, type: a, value: 4.3.2.1 } - { name: hello, type: a, value: 4.3.2.1 }
``` ```

View file

@ -9,19 +9,19 @@ $TTL {{ item.value.ttl|default(3600) }}
{{ item.value.negative_cache|default(86400) }} ; Negative Cache TTL {{ item.value.negative_cache|default(86400) }} ; Negative Cache TTL
) )
{% for entry in item.value.entries %} {% for record in item.value.records %}
{% if entry.type|upper == 'MX' %} {% if record.type|upper == 'MX' %}
{{ entry.name }} {{ entry.ttl|default(' ') }} IN MX {{ entry.priority }} {{ entry.value }} {{ record.name }} {{ record.ttl|default(' ') }} IN MX {{ record.priority }} {{ record.value }}
{% elif entry.type|upper == 'CAA' %} {% elif record.type|upper == 'CAA' %}
{{ entry.name }} {{ entry.ttl|default(' ') }} CAA {{ entry.flag }} {{ entry.tag }} "{{ entry.value }}" {{ record.name }} {{ record.ttl|default(' ') }} CAA {{ record.flag }} {{ record.tag }} "{{ record.value }}"
{% elif entry.type|upper == 'TXT' %} {% elif record.type|upper == 'TXT' %}
{{ entry.name }} {{ entry.ttl|default(' ') }} IN TXT ( {{ record.name }} {{ record.ttl|default(' ') }} IN TXT (
{% for charset in entry.value|batch(64) %} {% for charset in record.value|batch(64) %}
"{{ charset|join('') }}" "{{ charset|join('') }}"
{% endfor %} {% endfor %}
) )
{% else %} {% else %}
{{ entry.name }} {{ entry.ttl|default(' ') }} IN {{ entry.type|upper }} {{ entry.value }} {{ record.name }} {{ record.ttl|default(' ') }} IN {{ record.type|upper }} {{ record.value }}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% if 'dnssec' in item.value and item.value.dnssec %} {% if 'dnssec' in item.value and item.value.dnssec %}

View file

@ -16,7 +16,7 @@
expire: 2419200 expire: 2419200
negative_cache: 86400 negative_cache: 86400
dnssec: yes dnssec: yes
entries: records:
- { 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, ttl: 5m, value: 1.2.3.4 } - { name: hello, type: a, ttl: 5m, value: 1.2.3.4 }
@ -27,7 +27,7 @@
mail: root@hello.local mail: root@hello.local
serial: 2017092201 serial: 2017092201
dnssec: no dnssec: no
entries: records:
- { 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: '@', type: txt, value: RFufr9qzCi9vnJeWUB2FMNDCtu8ZtP6WE2jl2OFvIiz6pv2dwfzEXBgTC8SI1UzsmlkFYS7vxkHeYuOCLQ95BkOl0YP85ejQQlz8DNbcMcUdAoDtmlaZ9jeXnU7RgCXs5F9ggsmM9B6mFMhZWo1lzwsX86UAR5nw7rIO3cbGo9oUcMTShVFDkTPnoNhP7MTE0L4M99yv8ZLptmS2GP6goHXZgTdFIyYCdfziQgoENcloUI3KshDscsoh6H6I2LA } - { name: '@', type: txt, value: RFufr9qzCi9vnJeWUB2FMNDCtu8ZtP6WE2jl2OFvIiz6pv2dwfzEXBgTC8SI1UzsmlkFYS7vxkHeYuOCLQ95BkOl0YP85ejQQlz8DNbcMcUdAoDtmlaZ9jeXnU7RgCXs5F9ggsmM9B6mFMhZWo1lzwsX86UAR5nw7rIO3cbGo9oUcMTShVFDkTPnoNhP7MTE0L4M99yv8ZLptmS2GP6goHXZgTdFIyYCdfziQgoENcloUI3KshDscsoh6H6I2LA }