unbound/tasks/main.yml

30 lines
725 B
YAML

---
- name: unbound | Load system-specific vars
include_vars: "{{ ansible_system | lower }}.yml"
- name: unbound | Install package
package:
name: unbound
state: present
when: unbound_install_package
- name: unbound | Deploy config
template:
src: "{{ unbound_config_template }}"
dest: "{{ unbound_config_props.path }}"
mode: "{{ unbound_config_props.mode }}"
owner: "{{ unbound_config_props.owner }}"
group: "{{ unbound_config_props.group }}"
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