
Since unbound refuses to start before dns-root-data is installed, install it first. Change-Id: I78f42c217b2627bf3108ac4b13d437bb03857222
36 lines
772 B
YAML
36 lines
772 B
YAML
- name: Include OS-specific tasks
|
|
include_tasks: "{{ item }}"
|
|
vars:
|
|
params:
|
|
files: "{{ distro_lookup_path }}"
|
|
loop: "{{ query('first_found', params, errors='ignore') }}"
|
|
|
|
- name: Install dns-root-data on Noble
|
|
package:
|
|
state: present
|
|
name: dns-root-data
|
|
when: ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int >= 24
|
|
|
|
- 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: Enable unbound
|
|
service:
|
|
name: unbound
|
|
enabled: true
|
|
state: started
|