Generate IP address list automatically.

This commit is contained in:
Andreas B. Mundt 2019-05-25 22:44:59 +03:00
parent 7404d7ace4
commit dd89bbb9a4
2 changed files with 8 additions and 0 deletions

View file

@ -3,6 +3,13 @@
name: dnsmasq
state: latest
- name: add client hostnames and IP addresses to /etc/hosts
lineinfile:
dest: /etc/hosts
line: "{{ item.1 }}\t{{ 'debian%03d' | format(item.0) }}"
with_indexed_items: "{{ dhcp_list }}"
notify: "restart dnsmasq"
- name: configure dnsmasq
template:
src: dnsmasq-transparent-proxy.j2