You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
610 B
YAML
29 lines
610 B
YAML
---
|
|
|
|
- name: Install required packages
|
|
apt:
|
|
state: present
|
|
name:
|
|
- dnsmasq
|
|
|
|
- name: Configure dnsmasq
|
|
template:
|
|
src: dnsmasq.conf
|
|
dest: "{{ global_dnsmasq_configuration_directory }}/0_main.conf"
|
|
owner: root
|
|
group: root
|
|
mode: u=rw,g=r,o=r
|
|
validate: "/usr/sbin/dnsmasq --test --conf-file=%s"
|
|
notify: restart dnsmasq
|
|
|
|
- meta: flush_handlers
|
|
|
|
- name: Configure system to use dnsmasq
|
|
template:
|
|
src: resolv.conf
|
|
dest: "{{ global_resolv_conf }}"
|
|
owner: root
|
|
group: root
|
|
mode: u=r,g=r,o=r
|
|
attributes: +i # immutable, may will let this task failing
|