2021-12-23 01:36:15 +03:00
|
|
|
---
|
|
|
|
|
|
|
|
- name: unbound | Load system-specific vars
|
|
|
|
include_vars: "{{ ansible_system | lower }}.yml"
|
|
|
|
|
|
|
|
- name: unbound | Install package
|
|
|
|
package:
|
|
|
|
name: unbound
|
|
|
|
state: present
|
2021-12-27 19:20:21 +03:00
|
|
|
when: unbound_install_package
|
2021-12-23 01:36:15 +03:00
|
|
|
|
|
|
|
- name: unbound | Deploy config
|
|
|
|
template:
|
|
|
|
src: "{{ unbound_config_template }}"
|
2021-12-27 23:58:17 +03:00
|
|
|
dest: "{{ unbound_config_props.path }}"
|
|
|
|
mode: "{{ unbound_config_props.mode }}"
|
|
|
|
owner: "{{ unbound_config_props.owner }}"
|
|
|
|
group: "{{ unbound_config_props.group }}"
|
2021-12-23 01:36:15 +03:00
|
|
|
validate: "unbound-checkconf %s"
|
|
|
|
notify: unbound | Reload configuration
|
|
|
|
|
|
|
|
- name: unbound | Enable and start unbound
|
|
|
|
service:
|
|
|
|
name: unbound
|
|
|
|
state: started
|
|
|
|
enabled: yes
|
|
|
|
|
|
|
|
- name: unbound | Run handlers
|
|
|
|
meta: flush_handlers
|