Improved DHCP configuration, no static IP addresses.
This commit is contained in:
parent
3b3303e96d
commit
be829760c6
4 changed files with 6 additions and 13 deletions
|
@ -4,17 +4,11 @@
|
|||
|
||||
- name: install dnsmasq package
|
||||
apt:
|
||||
name: dnsmasq
|
||||
name:
|
||||
- dnsmasq
|
||||
- resolvconf
|
||||
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"
|
||||
when: not dnsmasq.stat.exists
|
||||
|
||||
- name: configure dnsmasq
|
||||
template:
|
||||
src: dnsmasq-dhcp.j2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue