Zack Williams | 142f2b5 | 2020-11-22 19:35:44 -0700 | [diff] [blame] | 1 | --- |
| 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 Williams | 8296e47 | 2021-03-23 21:13:07 -0700 | [diff] [blame^] | 30 | arguments: "{{ unbound_arguments | default(omit) }}" |
Zack Williams | 142f2b5 | 2020-11-22 19:35:44 -0700 | [diff] [blame] | 31 | |
| 32 | - name: Flush handlers as listen addresses can conflict with nsd |
| 33 | meta: flush_handlers |