blob: f88267f3dbe1400006bdda4803fe07b47f88b62b [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
- name: Flush handlers as listen addresses can conflict with nsd
meta: flush_handlers