blob: f88267f3dbe1400006bdda4803fe07b47f88b62b [file] [log] [blame]
Zack Williams142f2b52020-11-22 19:35:44 -07001---
2# unbound tasks/main.yml
3#
4# SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org>
5# SPDX-License-Identifier: Apache-2.0
6
7- name: include OS-specific vars
8 include_vars: "{{ ansible_os_family }}.yml"
9
10- name: include OS-specific tasks
11 include_tasks: "{{ ansible_os_family }}.yml"
12
13- name: Create unbound.conf configuration file from template
14 template:
15 src: "unbound.conf.j2"
16 dest: "{{ unbound_conf_dir }}/unbound.conf"
17 owner: root
18 group: "{{ unbound_groupname }}"
19 mode: 0644
20 backup: true
21 validate: "unbound-checkconf %s"
22 notify:
23 - unbound-restart
24
25- name: Enable and start unbound
26 service:
27 name: "{{ unbound_service }}"
28 enabled: true
29 state: started
30
31- name: Flush handlers as listen addresses can conflict with nsd
32 meta: flush_handlers