2021-09-30 00:22:27 +02:00
|
|
|
---
|
|
|
|
- name: Copy unbound configuration snippets
|
|
|
|
become: true
|
|
|
|
ansible.builtin.copy:
|
|
|
|
src: '{{ item }}'
|
|
|
|
dest: '/etc/unbound/unbound.conf.d/'
|
|
|
|
owner: root
|
|
|
|
group: root
|
2022-11-17 22:35:33 +01:00
|
|
|
mode: 'u=rwX,g=rX,o=rX'
|
2021-09-30 00:22:27 +02:00
|
|
|
with_fileglob:
|
|
|
|
- 'files/snippets/*.conf'
|
2022-11-17 22:35:33 +01:00
|
|
|
notify: Systemctl restart unbound
|
2021-09-30 00:22:27 +02:00
|
|
|
|
|
|
|
- name: Copy main unbound configuration
|
|
|
|
become: true
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: 'files/unbound.conf'
|
|
|
|
dest: '/etc/unbound/unbound.conf'
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 'u=rw,g=r,o=r'
|
|
|
|
validate: unbound-checkconf %s
|
2022-11-17 22:35:33 +01:00
|
|
|
notify: Systemctl restart unbound
|