2019-11-18 15:31:30 +01:00
|
|
|
- name: check if dnsmasq is already there
|
|
|
|
stat: path=/etc/dnsmasq.d/dnsmasq-dhcp
|
|
|
|
register: dnsmasq
|
|
|
|
|
2018-06-04 18:00:25 +03:00
|
|
|
- name: install dnsmasq package
|
2018-05-31 18:20:51 +03:00
|
|
|
apt:
|
2019-11-29 14:38:07 +01:00
|
|
|
name:
|
|
|
|
- dnsmasq
|
|
|
|
- resolvconf
|
2022-06-11 12:42:02 +02:00
|
|
|
state: latest # noqa package-latest
|
2018-05-31 18:20:51 +03:00
|
|
|
|
2021-04-09 10:31:16 +02:00
|
|
|
- name: configure dnsmasq dhcp
|
2018-05-31 18:20:51 +03:00
|
|
|
template:
|
2019-10-24 20:27:35 +02:00
|
|
|
src: dnsmasq-dhcp.j2
|
|
|
|
dest: /etc/dnsmasq.d/dnsmasq-dhcp
|
2022-06-11 12:42:02 +02:00
|
|
|
mode: 0644
|
2018-05-31 18:20:51 +03:00
|
|
|
notify: "restart dnsmasq"
|
2021-04-09 10:31:16 +02:00
|
|
|
|
|
|
|
- name: configure dnsmasq tftp
|
|
|
|
template:
|
|
|
|
src: dnsmasq-tftp-netboot-installer.j2
|
|
|
|
dest: /etc/dnsmasq.d/tftp-netboot-installer
|
2022-06-11 12:42:02 +02:00
|
|
|
mode: 0644
|
2021-04-09 10:31:16 +02:00
|
|
|
notify: "restart dnsmasq"
|