2 - name: Fetch debian installer and bake initrd
3 hosts: "{{ hostname }}"
8 prompt: Where is the USB installation medium mounted to?
13 preseed_path: "{{ global_artifacts_dir }}/{{ hostname }}"
14 debian_installer_path: "{{ global_cache_dir }}/debian-installer"
18 install_cooked: "{{ install }}"
19 network_cooked: "{{ network }}"
25 - "{{ preseed_path }}"
26 - "{{ debian_installer_path }}"
33 path: "{{ usbdrive_path }}"
36 - when: pathcheck.stat.exists
38 - name: Copy generated files to the USB drive
40 src: "{{ item.value }}"
41 dest: "{{ usbdrive_path }}/{{ item.key }}"
43 initrd.gz: "{{ global_artifacts_dir }}/{{ hostname }}/{{ hostname }}-{{ install_distro }}-{{ install_codename }}.initrd.gz"
44 linux: "{{ global_cache_dir }}/debian-installer/{{ install_distro }}-{{ install_codename }}/{{ install.arch | default('amd64') }}/linux"
46 - name: Generate syslinux configuration
48 dest: "{{ usbdrive_path }}/syslinux.cfg"
51 SAY SYSLINUX booting an automated installer for {{ hostname }}...
55 APPEND install vga=off console=ttyS0,115200n8
57 - name: Make the USB disk bootable
61 You should make sure the USB disk is bootable and
62 has syslinux installed.
64 $ sudo apt install mbr syslinux
65 $ sudo install-mbr /dev/CHANGEME
66 $ sudo syslinux -i /dev/CHANGEME1
67 $ sudo fdisk /dev/CHANGEME
68 [Here, make sure partition 1 is marked bootable.]
70 This will NOT be done automatically.