system-config/playbooks/roles/unbound/tasks/main.yaml
James E. Blair 3d166f99f6 Add unbound role
Add it to the base playbook and add a testinfra test for it.

Change-Id: Id5098f33aac213e6add6f061684d0214dc99ab5b
2018-08-27 13:29:18 -07:00

35 lines
646 B
YAML

- name: Include OS-specific tasks
include_tasks: "{{ item }}"
vars:
params:
files: "{{ distro_lookup_path }}"
skip: true
loop: "{{ query('first_found', params) }}"
- name: Install unbound
package:
state: present
name: unbound
- name: Write dhclient config file
copy:
src: dhclient.conf
dest: "{{ item }}"
mode: 0444
when: item is file
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: Enable unbound
service:
name: unbound
enabled: true
state: started