lmn-client/roles/netboot-installer/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

26 lines
743 B
YAML

- name: make preseed directory available
file:
path: "{{ tftp_root }}/d-i/{{ di_dist }}"
state: directory
- name: install di-netboot-assistant and installer package
apt:
name:
- di-netboot-assistant
- "{{ di_pkg }}"
notify:
- bind mount images
- rebuild di-netboot-assistant menu
- name: provide preseed file
copy:
src: /usr/share/doc/di-netboot-assistant/examples/preseed.cfg
dest: "{{ tftp_root }}/d-i/{{ di_dist }}"
force: no
remote_src: yes
- name: make the hostname resolvable from the LAN
replace:
path: /etc/hosts
regexp: '^(127\.0\.1\.1.*)$'
replace: '#\1\n{{ ipaddr_lan | ipaddr("address") }} {{ ansible_hostname }}.{{ ansible_domain }} {{ ansible_hostname }}'