Fix some errors

This commit is contained in:
s3lph 2020-11-20 02:14:16 +01:00
parent bbf100ddfd
commit 89d265190b
3 changed files with 6 additions and 4 deletions

View file

@ -28,12 +28,12 @@
- name: render knot zone files
template:
src: var/lib/knot/master/zone.j2
dest: "/var/lib/knot/master/{{ zone.name }}"
dest: "/var/lib/knot/master/{{ zone.name }}zone"
owner: knot
group: knot
mode: 0640
vars:
zone: "hostvars[inventory_hostname]['knot_zone_' + item]"
zone: "{{ hostvars[inventory_hostname]['knot_zone_' + item.1] }}"
loop: "{{ knot_zone_groups | subelements('zones') }}"
notify: reload knot

View file

@ -30,6 +30,8 @@ template:
- id: {{ name }}
storage: {{ knot_zone_storage_path }}
semantic-checks: {{ knot_zone_semantic_checks }}
serial-policy: unixtime
zonefile-load: difference
dnssec-signing: {{ knot_zone_dnssec_signing }}
dnssec-policy: dnssec-{{ name }}
acl: xfr-{{ name }}

View file

@ -1,7 +1,7 @@
$TTL {{ zone.soa.ttl }}
@ {{ zone.soa.class }} SOA {{ primary }} {{ zone.soa.rname }} (
@ {{ zone.soa.class }} SOA {{ zone.soa.primary }}. {{ zone.soa.rname }}. (
{{ ansible_date_time.epoch }} ; serial
{{ zone.soa.refresh }} ; refresh
{{ zone.soa.retry }} ; retry
@ -11,6 +11,6 @@ $TTL {{ zone.soa.ttl }}
{% for r in zone.records %}
{{ r.name }} {{ r.ttl|default('') }} {{ r.class|default('') }} {{ r.type }} {{ r.content }}
{{ r.name }} {{ r.ttl|default('') }} {{ r.class|default('') }} {{ r.type }} {{ r.value }}
{% endfor %}