Generate IP address list automatically.
This commit is contained in:
parent
7404d7ace4
commit
dd89bbb9a4
2 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue