1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_unbound.git synced 2024-08-16 13:39:49 +02:00
ansible_role_unbound/tasks/configure.yml

45 lines
1.2 KiB
YAML
Raw Normal View History

2021-09-30 00:22:27 +02:00
---
2022-11-17 23:46:33 +01:00
- name: Copy snipet to protect for DNS rebinding
2021-09-30 00:22:27 +02:00
become: true
2022-11-17 23:46:33 +01:00
ansible.builtin.template:
src: 'templates/snippets/private-addresses.conf'
dest: '/etc/unbound/unbound.conf.d/'
owner: root
group: root
mode: 'u=rw,g=r,o=r'
notify: 'Systemctl restart unbound'
when: unbount__dns_rebind_protection | bool
- name: Copy snipet for qname privacy
become: true
ansible.builtin.template:
src: 'templates/snippets/qname-minimisation.conf'
2021-09-30 00:22:27 +02:00
dest: '/etc/unbound/unbound.conf.d/'
owner: root
group: root
2022-11-17 23:46:33 +01:00
mode: 'u=rw,g=r,o=r'
notify: 'Systemctl restart unbound'
when: unbount__dns_qname_minimisation | bool
- name: Copy anchor snippet
become: true
ansible.builtin.template:
src: 'templates/snippets/root-auto-trust-anchor-file.conf'
dest: '/etc/unbound/unbound.conf.d/'
owner: root
group: root
mode: 'u=rw,g=r,o=r'
notify: 'Systemctl restart unbound'
when: unbound__auto_trust_anchor | bool
2021-09-30 00:22:27 +02:00
2022-11-17 23:46:33 +01:00
- name: Transfer main unbound configuration
2021-09-30 00:22:27 +02:00
become: true
ansible.builtin.template:
2022-11-17 23:46:33 +01:00
src: 'templates/unbound.conf'
2021-09-30 00:22:27 +02:00
dest: '/etc/unbound/unbound.conf'
owner: root
group: root
mode: 'u=rw,g=r,o=r'
validate: unbound-checkconf %s
2022-11-17 23:46:33 +01:00
notify: 'Systemctl restart unbound'