ansible-roles/unbound/tasks/main.yml
Jérémy Lecour 00fe225a3c
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |2615|7|2608|177|:+1: Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/unstable/278//ansiblelint">Evolix » ansible-roles » unstable #278</a>
gitea/ansible-roles/pipeline/head This commit looks good
force: [yes,no] → force [true,false]
2023-06-28 13:25:30 +02:00

39 lines
785 B
YAML

---
- name: Install Unbound package
ansible.builtin.apt:
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: true
mode: "0644"
notify: reload unbound
tags:
- unbound
- name: Copy Unbound config
ansible.builtin.template:
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:
name: unbound
enabled: yes
state: started
tags:
- unbound