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

42 lines
1,005 B
YAML
Raw Normal View History

2018-06-04 18:00:25 +03:00
- name: add stretch-backports
apt_repository:
repo: deb http://deb.debian.org/debian/ stretch-backports main
state: present
- name: install di-netboot-assistant from backports
2018-05-31 18:20:51 +03:00
apt:
name:
- di-netboot-assistant
2018-06-04 18:00:25 +03:00
default_release: stretch-backports
update_cache: yes
- name: add installer package
apt:
name:
2018-05-31 18:20:51 +03:00
- debian-installer-9-netboot-amd64
- name: bind mount images
mount:
2018-06-04 18:00:25 +03:00
path: "{{ tftp_root }}/d-i/n-pkg/"
2018-05-31 18:20:51 +03:00
src: /usr/lib/debian-installer/
fstype: none
opts: bind
# state: mounted BEGINN WORKAROUND
state: present
register: fstab
2018-06-04 18:00:25 +03:00
- file: path="{{ tftp_root }}/d-i/n-pkg/" state=directory recurse=yes
2018-05-31 18:20:51 +03:00
- name: Reload fstab
command: mount -a
when: fstab.changed
# https://github.com/ansible/ansible/issues/23487 END WORKAROUND
- 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