blob: 2a21a0ff6e91ec84e1d9505d5bf363e035215c64 [file] [log] [blame]
---
# unbound tasks/main.yml
#
# SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org>
# SPDX-License-Identifier: Apache-2.0
- name: include OS-specific vars
include_vars: "{{ ansible_os_family }}.yml"
- name: include OS-specific tasks
include_tasks: "{{ ansible_os_family }}.yml"
- name: Create unbound.conf configuration file from template
template:
src: "unbound.conf.j2"
dest: "{{ unbound_conf_dir }}/unbound.conf"
owner: root
group: "{{ unbound_groupname }}"
mode: 0644
backup: true
validate: "unbound-checkconf %s"
notify:
- unbound-restart
- name: Enable and start unbound
service:
name: "{{ unbound_service }}"
enabled: true
state: started
arguments: "{{ unbound_arguments | default(omit) }}"
- name: Flush handlers as listen addresses can conflict with nsd
meta: flush_handlers