trixie/roles/tftp-netboot-installer/tasks/main.yml

34 lines
925 B
YAML
Raw Normal View History

- name: make preseed directory available
file:
path: "{{ tftp_root }}/d-i/{{ di_dist }}"
state: directory
2019-05-24 17:26:15 +03:00
- name: install di-netboot-assistant and installer package
2018-05-31 18:20:51 +03:00
apt:
name:
- di-netboot-assistant
2019-05-24 17:26:15 +03:00
- "{{ di_pkg }}"
notify:
- bind mount images
- rebuild di-netboot-assistant menu
2018-05-31 18:20:51 +03:00
- name: provide preseed file
copy:
src: /usr/share/doc/di-netboot-assistant/examples/preseed.cfg
dest: "{{ tftp_root }}/d-i/{{ di_dist }}"
force: no
2018-05-31 18:20:51 +03:00
- name: configure dnsmasq
template:
src: dnsmasq-tftp-netboot-installer.j2
dest: /etc/dnsmasq.d/tftp-netboot-installer
notify:
- restart dnsmasq
- rebuild di-netboot-assistant menu
- 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 }}'