2018-03-10 19:18:04 +01:00
|
|
|
---
|
|
|
|
- name: Install unbound
|
|
|
|
apt:
|
2019-07-20 02:08:55 +02:00
|
|
|
package:
|
2019-01-21 23:14:16 +01:00
|
|
|
- unbound
|
2018-03-10 19:18:04 +01:00
|
|
|
state: 'latest'
|
|
|
|
update_cache: yes
|
|
|
|
cache_valid_time: 43200
|
|
|
|
|
2019-07-20 02:08:55 +02:00
|
|
|
|
2018-03-10 19:18:04 +01:00
|
|
|
- name: Copy unbound configuration snippets
|
|
|
|
copy:
|
|
|
|
src: '{{ item }}'
|
|
|
|
dest: '/etc/unbound/unbound.conf.d/'
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 'u=rw,g=r,o=r'
|
|
|
|
with_fileglob:
|
|
|
|
- 'files/snippets/*.conf'
|
2019-07-20 13:49:51 +02:00
|
|
|
notify:
|
|
|
|
- unbound checkconf
|
2018-03-10 19:18:04 +01:00
|
|
|
|
2019-07-20 02:08:55 +02:00
|
|
|
|
2018-03-10 19:18:04 +01:00
|
|
|
- name: Copy main unbound configuration
|
2019-07-20 02:08:55 +02:00
|
|
|
template:
|
2018-03-15 03:18:34 +01:00
|
|
|
src: '{{ lookup("hf", "unbound.conf") }}'
|
2018-03-10 19:18:04 +01:00
|
|
|
dest: '/etc/unbound/unbound.conf'
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 'u=rw,g=r,o=r'
|
|
|
|
notify:
|
2019-07-20 13:49:51 +02:00
|
|
|
- unbound checkconf
|