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
2021-03-13 01:13:41 +01:00

37 lines
828 B
YAML

---
- name: run optional versionscheck
ansible.builtin.include_tasks: versioncheck.yml
when: submodules_versioncheck|bool
- name: Install unbound
become: true
ansible.builtin.apt:
name:
- unbound
state: "{{ unbound__state }}"
update_cache: true
cache_valid_time: 43200
- name: Copy unbound configuration snippets
become: true
ansible.builtin.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'
notify:
- unbound checkconf
- name: Copy main unbound configuration
become: true
ansible.builtin.template:
src: 'files/unbound.conf'
dest: '/etc/unbound/unbound.conf'
owner: root
group: root
mode: 'u=rw,g=r,o=r'
notify:
- unbound checkconf