fix: rename files to .yaml
All checks were successful
Lint Markdown files / markdown-lint (push) Successful in 4s
Ansible Linter / ansible-lint (push) Successful in 58s

This commit is contained in:
2025-11-22 23:58:46 +01:00
parent 73fc7feedb
commit 1ad689e41d
5 changed files with 5 additions and 5 deletions

View File

@@ -0,0 +1,48 @@
---
- name: "Create config directory of DNS zones"
ansible.builtin.file:
path: "{{ bind_config_directory }}/{{ zone.file | dirname }}"
owner: "{{ bind_unix_user }}"
group: "{{ bind_unix_group }}"
mode: "0755"
state: directory
with_items:
- "{{ view.zones }}"
loop_control:
loop_var: zone
when: zone.file is defined and
zone.file | length > 0
- name: "Template view {{ view.name }}"
ansible.builtin.template:
src: "{{ inventory_hostname }}/etc/named/{{ zone.file }}.j2"
dest: "{{ bind_config_directory + '/' + zone.file }}"
owner: "{{ bind_unix_user }}"
group: "{{ bind_unix_group }}"
mode: "0644"
with_items:
- "{{ view.zones }}"
loop_control:
loop_var: zone
when: zone.config.type == 'master'
notify: Restart named
- name: Check if last character in zone files is a newline
ansible.builtin.include_tasks: verify_zone_file.yaml
with_items:
- "{{ view.zones }}"
loop_control:
loop_var: zone
when: zone.config.type == 'master'
- name: Sign Zones
ansible.builtin.include_tasks: sign_zone_file.yaml
with_items:
- "{{ view.zones }}"
loop_control:
loop_var: zone
when: zone.config.type == 'master' and
bind9_dnssec_keys | selectattr('origin', 'in', zone.config.origin) | map(attribute='zone_signing_key') | length > 0 and
(bind9_dnssec_keys | selectattr('origin', 'in', zone.config.origin) | map(attribute='zone_signing_key'))[0].private | length > 0 and
(bind9_dnssec_keys | selectattr('origin', 'in', zone.config.origin) | map(attribute='zone_signing_key'))[0].public | length > 0