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

Better config file validation

This commit is contained in:
Raoul 2019-07-20 13:49:51 +02:00
parent e121b4a4e5
commit 0681511139
No known key found for this signature in database
GPG key ID: C7493D73B67C1842
3 changed files with 9 additions and 4 deletions

View file

@ -4,7 +4,6 @@ remote-control:
control-enable: no
server:
# listen on local network, allow local network access
{% for address in unbound_listen_addresses %}
interface: {{ address }}
{% endfor %}
@ -13,7 +12,6 @@ server:
chroot: ""
# logging
log-time-ascii: yes
log-queries: no
verbosity: 1

View file

@ -1,4 +1,10 @@
---
- name: unbound checkconf
command: unbound-checkconf /etc/unbound/unbound.conf
changed_when: True
notify: restart unbound
- name: restart unbound
service:
name: unbound

View file

@ -17,6 +17,8 @@
mode: 'u=rw,g=r,o=r'
with_fileglob:
- 'files/snippets/*.conf'
notify:
- unbound checkconf
- name: Copy main unbound configuration
@ -26,6 +28,5 @@
owner: root
group: root
mode: 'u=rw,g=r,o=r'
validate: 'unbound-checkconf %s'
notify:
- restart unbound
- unbound checkconf