19 lines
333 B
YAML
19 lines
333 B
YAML
---
|
|
|
|
- name: install dnsmasq
|
|
apt:
|
|
name: dnsmasq
|
|
|
|
|
|
- name: Generate /etc/hosts file
|
|
template:
|
|
src: hosts.j2
|
|
dest: /etc/hosts
|
|
|
|
- name: listen on all interfaces
|
|
lineinfile:
|
|
dest: /etc/dnsmasq.conf
|
|
regexp: listen-address=
|
|
line: listen-address=127.0.0.1,{{ ansible_default_ipv4.address }}
|
|
state: present
|