2019-03-09 00:31:38 +00:00
|
|
|
---
|
2022-08-30 12:24:18 +00:00
|
|
|
- name: gather os specific variables
|
2022-08-31 03:19:06 +00:00
|
|
|
ansible.builtin.include_vars: "{{ lookup('first_found', params) }}"
|
2022-08-30 12:24:18 +00:00
|
|
|
vars:
|
2022-08-31 03:19:06 +00:00
|
|
|
params:
|
2022-08-30 12:24:18 +00:00
|
|
|
files:
|
|
|
|
- "{{ ansible_distribution }}-{{ ansible_distribution_version }}.yaml"
|
|
|
|
- "{{ ansible_distribution }}.yaml"
|
|
|
|
- "{{ ansible_os_family }}.yaml"
|
|
|
|
- "default.yaml"
|
|
|
|
paths:
|
|
|
|
- vars
|
|
|
|
|
|
|
|
- name: include os specific tasks
|
2022-08-31 03:19:06 +00:00
|
|
|
ansible.builtin.include_tasks: "{{ lookup('first_found', params) }}"
|
2022-08-30 12:24:18 +00:00
|
|
|
vars:
|
2022-08-31 03:19:06 +00:00
|
|
|
params:
|
2022-08-30 12:24:18 +00:00
|
|
|
files:
|
|
|
|
- "{{ ansible_distribution }}-{{ ansible_distribution_version }}.yaml"
|
|
|
|
- "{{ ansible_distribution }}.yaml"
|
|
|
|
- "{{ ansible_os_family }}.yaml"
|
|
|
|
- "default.yaml"
|
|
|
|
paths:
|
|
|
|
- tasks
|
|
|
|
|
2019-03-09 00:31:38 +00:00
|
|
|
- name: install unbound
|
|
|
|
package:
|
|
|
|
name: "{{ unbound_package_name }}"
|
|
|
|
state: "{{ unbound_package_state }}"
|
|
|
|
|
2022-08-30 12:24:18 +00:00
|
|
|
- name: configure unbound interfaces
|
|
|
|
template:
|
|
|
|
src: listen.conf.j2
|
|
|
|
dest: "{{ unbound_conf_d_path }}/listen.conf"
|
|
|
|
validate: "{{ unbound_checkconf_command }}"
|
|
|
|
notify:
|
|
|
|
- restart unbound
|
|
|
|
|
|
|
|
- name: configure unbound forward zones
|
2019-03-09 00:31:38 +00:00
|
|
|
template:
|
|
|
|
src: forward.conf.j2
|
2022-08-30 12:24:18 +00:00
|
|
|
dest: "{{ unbound_conf_d_path }}/forward.conf"
|
|
|
|
validate: "{{ unbound_checkconf_command }}"
|
2019-03-09 00:31:38 +00:00
|
|
|
notify:
|
|
|
|
- reload unbound
|
|
|
|
|
|
|
|
- name: start unbound
|
|
|
|
service:
|
|
|
|
name: "{{ unbound_service_name }}"
|
|
|
|
state: "{{ unbound_service_state }}"
|
|
|
|
enabled: "{{ unbound_service_enabled }}"
|
2019-03-27 07:08:13 +00:00
|
|
|
|
|
|
|
# vim:ft=yaml.ansible:
|