lmn-client/roles/dnsmasq/tasks/main.yml
Andreas B. Mundt ebcfd88ef4 Restructuring/renaming DNS, DHCP, TFTP and netboot installer.
Idea: The role 'dnsmasq' and a new role 'dns-dhcp-tftp' are
drop-in replacements and interchangeable. 'netboot-installer'
works indepently of the role chosen for DNS, DHCP and TFTP.
2023-02-07 19:15:50 +01:00

22 lines
504 B
YAML

- name: check if dnsmasq is already there
stat: path=/etc/dnsmasq.d/dnsmasq-dhcp
register: dnsmasq
- name: install dnsmasq package
apt:
name:
- dnsmasq
- resolvconf
state: latest
- name: configure dnsmasq dhcp
template:
src: dnsmasq-dhcp.j2
dest: /etc/dnsmasq.d/dnsmasq-dhcp
notify: "restart dnsmasq"
- name: configure dnsmasq tftp
template:
src: dnsmasq-tftp-netboot-installer.j2
dest: /etc/dnsmasq.d/tftp-netboot-installer
notify: "restart dnsmasq"