-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathmain.yaml
More file actions
38 lines (33 loc) · 814 Bytes
/
main.yaml
File metadata and controls
38 lines (33 loc) · 814 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
- name: Include OS-specific tasks
include_tasks: "{{ item }}"
vars:
params:
files: "{{ distro_lookup_path }}"
loop: "{{ query('first_found', params, errors='ignore') }}"
- name: Install unbound
package:
state: present
name: unbound
- name: Write dhclient config files
include_tasks: dhclient.yaml
loop:
- /etc/dhcp/dhclient.conf
- /etc/dhcp/dhclient-eth0.conf
- name: Write resolv.conf
copy:
src: resolv.conf
dest: /etc/resolv.conf
mode: 0444
- name: Write unbound forward file
template:
src: "unbound.confd.conf.j2"
dest: "/etc/unbound/conf.d/{{ zone.name }}.conf"
mode: "0644"
loop: "{{ unbound_forward_zones }}"
loop_control:
loop_var: "zone"
- name: Enable unbound
service:
name: unbound
enabled: true
state: started