- Quote octal file mode values (0640, 0750 -> '0640', '0750') - Add 'Prepare' name to prepare.yml play - Fix truthy value in .gitea/workflows/test.yaml (on -> 'on') - Use role name 'bind9' instead of path in converge.yml - Move tags to top-level for Deploy and Validate Configuration block - Remove unnecessary comments to clean up code - Ensure all YAML and Ansible files pass ansible-lint production profile
26 lines
600 B
YAML
26 lines
600 B
YAML
---
|
|
# handlers file for bind9
|
|
- name: Reload bind
|
|
ansible.builtin.service:
|
|
name: named
|
|
state: reloaded
|
|
|
|
- name: Restart bind
|
|
ansible.builtin.service:
|
|
name: named
|
|
state: restarted
|
|
|
|
- name: Backup bind config
|
|
community.general.archive:
|
|
path:
|
|
- "{{ bind9_cfgdir }}"
|
|
- "{{ bind9_working_directory }}"
|
|
- "{{ bind9_libdir }}"
|
|
dest: "{{
|
|
bind9_backup_dir + '/bind9-config-' +
|
|
ansible_facts.date_time.iso8601_basic_short + '.tar.gz' }}"
|
|
owner: root
|
|
group: root
|
|
mode: '0640'
|
|
when: bind9_backup_config is defined and bind9_backup_config
|