blob: 2a21a0ff6e91ec84e1d9505d5bf363e035215c64 [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
Zack Williams8296e472021-03-23 21:13:07 -070030 arguments: "{{ unbound_arguments | default(omit) }}"
Zack Williams142f2b52020-11-22 19:35:44 -070031
32- name: Flush handlers as listen addresses can conflict with nsd
33 meta: flush_handlers