2 - name: Fetch debian installer and bake initrd
3 hosts: "{{ hostname }}"
8 prompt: Where is the USB installation medium mounted to?
14 install_cooked: "{{ install }}"
15 network_cooked: "{{ network }}"
16 artifacts_dir: "{{ global_artifacts_dir }}/{{ hostname }}"
17 debian_installer_path: "{{ global_cache_dir }}/debian-installer"
21 name: "{{ artifacts_dir }}"
28 path: "{{ usbdrive_path }}"
31 - when: pathcheck.stat.exists
33 - name: Copy generated files to the USB drive
36 dest: "{{ usbdrive_path }}/"
38 - "{{ artifacts_dir }}/initrd.preseed.gz"
39 - "{{ global_cache_dir }}/debian-installer/{{ install_distro }}-{{ install_codename }}/{{ install.arch | default('amd64') }}/linux"
41 label: "{{ item | basename }}"
43 - name: Generate syslinux configuration
45 dest: "{{ usbdrive_path }}/syslinux.cfg"
48 SAY SYSLINUX booting an automated installer for {{ hostname }}...
51 INITRD initrd.preseed.gz
52 APPEND install {{ map(lambda opt, val: opt + ' ' + val, (install.kernel_cmdline or {}).items()).join(' ') }}
54 - name: Make the USB disk bootable
58 You should make sure the USB disk is bootable and
59 has syslinux installed.
61 $ sudo apt install mbr syslinux
62 $ sudo install-mbr /dev/CHANGEME
63 $ sudo syslinux -i /dev/CHANGEME1
64 $ sudo fdisk /dev/CHANGEME
65 [Here, make sure partition 1 is marked bootable.]
67 This will NOT be done automatically.