Move all of the role here

This commit is contained in:
Daniel Akulenok
2022-08-04 12:41:40 +02:00
commit 20a43d06bd
29 changed files with 1886 additions and 0 deletions

23
handlers/main.yml Normal file
View File

@@ -0,0 +1,23 @@
---
# 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_date_time.iso8601_basic_short }}.tar.gz"
owner: root
group: root
mode: 0640
when: bind9_backup_config is defined and bind9_backup_config