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:
parent
e121b4a4e5
commit
0681511139
3 changed files with 9 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue