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
|
control-enable: no
|
||||||
|
|
||||||
server:
|
server:
|
||||||
# listen on local network, allow local network access
|
|
||||||
{% for address in unbound_listen_addresses %}
|
{% for address in unbound_listen_addresses %}
|
||||||
interface: {{ address }}
|
interface: {{ address }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -13,7 +12,6 @@ server:
|
||||||
|
|
||||||
chroot: ""
|
chroot: ""
|
||||||
|
|
||||||
# logging
|
|
||||||
log-time-ascii: yes
|
log-time-ascii: yes
|
||||||
log-queries: no
|
log-queries: no
|
||||||
verbosity: 1
|
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
|
- name: restart unbound
|
||||||
service:
|
service:
|
||||||
name: unbound
|
name: unbound
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
mode: 'u=rw,g=r,o=r'
|
mode: 'u=rw,g=r,o=r'
|
||||||
with_fileglob:
|
with_fileglob:
|
||||||
- 'files/snippets/*.conf'
|
- 'files/snippets/*.conf'
|
||||||
|
notify:
|
||||||
|
- unbound checkconf
|
||||||
|
|
||||||
|
|
||||||
- name: Copy main unbound configuration
|
- name: Copy main unbound configuration
|
||||||
|
@ -26,6 +28,5 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 'u=rw,g=r,o=r'
|
mode: 'u=rw,g=r,o=r'
|
||||||
validate: 'unbound-checkconf %s'
|
|
||||||
notify:
|
notify:
|
||||||
- restart unbound
|
- unbound checkconf
|
||||||
|
|
Loading…
Reference in a new issue