2 - name: Fetch debian installer and bake initrd
3 hosts: "{{ hostname }}"
9 prompt: Where is the USB installation medium mounted to?
15 install_cooked: "{{ install }}"
16 network_cooked: "{{ network }}"
17 artifacts_dir: "{{ global_artifacts_dir }}/{{ hostname }}"
18 debian_installer_path: "{{ global_cache_dir }}/debian-installer"
22 name: "{{ artifacts_dir }}"
29 path: "{{ usbdrive_path }}"
32 - when: pathcheck.stat.exists
34 - name: Copy generated files to the USB drive
37 dest: "{{ usbdrive_path }}/"
39 - "{{ artifacts_dir }}/initrd.preseed.gz"
40 - "{{ global_cache_dir }}/debian-installer/{{ install_distro }}-{{ install_codename }}/{{ install.arch | default('amd64') }}/linux"
42 label: "{{ item | basename }}"
44 - name: Generate syslinux configuration
46 dest: "{{ usbdrive_path }}/syslinux.cfg"
49 SAY SYSLINUX booting an automated installer for {{ hostname }}...
52 INITRD initrd.preseed.gz
53 APPEND install {{ (install.kernel_cmdline | default([])) | join(' ') }}
55 - name: Make the USB disk bootable
59 You should make sure the USB disk is bootable and
60 has syslinux installed.
62 $ sudo apt install mbr syslinux
63 $ sudo install-mbr /dev/CHANGEME
64 $ sudo syslinux -i /dev/CHANGEME1
65 $ sudo fdisk /dev/CHANGEME
66 [Here, make sure partition 1 is marked bootable.]
68 This will NOT be done automatically.