ansible-roles/unbound/tasks/main.yml

39 lines
784 B
YAML
Raw Permalink Normal View History

2017-06-01 14:07:11 +02:00
---
- name: Install Unbound package
ansible.builtin.apt:
2017-06-01 14:07:11 +02:00
name: unbound
state: present
when: ansible_distribution == "Debian"
tags:
- unbound
- name: Retrieve list of root DNS servers
ansible.builtin.get_url:
url: https://www.internic.net/domain/named.cache
dest: /etc/unbound/root.hints
force: yes
mode: "0644"
notify: reload unbound
tags:
- unbound
2017-06-01 14:07:11 +02:00
- name: Copy Unbound config
ansible.builtin.template:
2017-06-01 14:07:11 +02:00
src: unbound.conf.j2
dest: /etc/unbound/unbound.conf
owner: root
group: root
mode: "0644"
when: ansible_distribution == "Debian"
notify: reload unbound
tags:
- unbound
- name: Starting and enabling Unbound
ansible.builtin.service:
2017-06-01 14:07:11 +02:00
name: unbound
enabled: yes
state: started
tags:
- unbound