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/main.yml

38 lines
828 B
YAML
Raw Normal View History

2018-03-10 19:18:04 +01:00
---
2021-03-13 01:13:41 +01:00
- name: run optional versionscheck
ansible.builtin.include_tasks: versioncheck.yml
2021-01-06 11:17:58 +01:00
when: submodules_versioncheck|bool
2018-03-10 19:18:04 +01:00
- name: Install unbound
2021-03-13 01:13:41 +01:00
become: true
ansible.builtin.apt:
name:
2019-01-21 23:14:16 +01:00
- unbound
2021-01-19 01:03:47 +01:00
state: "{{ unbound__state }}"
update_cache: true
2018-03-10 19:18:04 +01:00
cache_valid_time: 43200
- name: Copy unbound configuration snippets
2021-03-13 01:13:41 +01:00
become: true
ansible.builtin.copy:
2018-03-10 19:18:04 +01:00
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
- name: Copy main unbound configuration
2021-03-13 01:13:41 +01:00
become: true
ansible.builtin.template:
src: 'files/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