fix: add check to verify for newline char in zone files

This commit is contained in:
2024-04-29 21:57:30 +02:00
parent ead1284611
commit 5bb333929b
2 changed files with 22 additions and 1 deletions

View File

@ -16,7 +16,7 @@
- name: "Template view {{ view.name }}"
ansible.builtin.template:
src: "{{ inventory_hostname }}/etc/named/{{ zone.file }}.j2"
dest: "{{ bind_config_directory }}/{{ zone.file }}"
dest: "{{ bind_config_directory + '/' + zone.file }}"
owner: "{{ bind_unix_user }}"
group: "{{ bind_unix_group }}"
mode: "0644"
@ -26,3 +26,11 @@
loop_var: zone
when: zone.type == 'master'
notify: Restart named
- name: Check if last character in zone files is a newline
ansible.builtin.include_tasks: verify_zone_file.yml
with_items:
- "{{ view.zones }}"
loop_control:
loop_var: zone
when: zone.type == 'master'