Fix missing variable for master zone files

This commit is contained in:
s3lph 2021-01-16 04:30:34 +01:00
parent db202e39fe
commit 3660754332

View file

@ -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