diff --git a/roles/knot/tasks/config.yml b/roles/knot/tasks/config.yml index afb3ec3..cd920a7 100644 --- a/roles/knot/tasks/config.yml +++ b/roles/knot/tasks/config.yml @@ -31,11 +31,13 @@ - name: render knot zone files template: src: var/lib/knot/master/zone.j2 - dest: "{{ knot_zone_master_storage_path }}/{{ item.name }}.zone" + dest: "{{ knot_zone_master_storage_path }}/{{ item.name }}zone" owner: knot group: knot mode: 0640 validate: /usr/bin/kzonecheck -v %s + vars: + zone: "{{ item }}" when: "inventory_hostname in item['masters']" loop: "{{ hostvars[inventory_hostname] | dict2items | selectattr('key', 'match', '^knot_zone_.+$') | map(attribute='value') | list }}" notify: reload knot