2 - name: Make a temporary directory
7 tmpdir: "{{ tmpdir.stdout }}"
8 initramfs: "{{ preseed_path | mandatory }}/{{ hostname }}-{{ distro }}-{{ distcodename }}.initrd.gz"
10 - name: Copy initramfs into position
13 src: "{{ debian_installer_path | mandatory }}/{{ distro }}-{{ distcodename }}/{{ install.arch | default('amd64') }}/initrd.gz"
14 dest: "{{ initramfs }}"
16 - name: Generate preseed file
18 src: "preseed_{{ distro }}-{{ distcodename }}.cfg.j2"
19 dest: "{{ tmpdir }}/preseed.cfg"
21 - name: Generate authorized_keys file
25 path: "{{ tmpdir }}/authorized_keys"
26 key: "{{ ssh_keys | join('\n') }}"
28 - name: Inject files into initramfs
29 shell: cpio -H newc -o | gzip -9 >> '{{ initramfs }}'
37 - name: Delete temporary directory