- hosts: image tasks: - name: "configure initramfs compression to use zstd" lineinfile: path: /etc/initramfs-tools/initramfs.conf regexp: '^COMPRESS=' line: 'COMPRESS=zstd' - name: "configure initramfs compression level" lineinfile: path: /etc/initramfs-tools/initramfs.conf regexp: '^COMPRESSLEVEL=' line: 'COMPRESSLEVEL=19' - name: "configure initramfs to load only specified kernel modules" lineinfile: path: /etc/initramfs-tools/initramfs.conf regexp: '^MODULES=' line: 'MODULES=list' - name: "set list of kernel modules for initramfs to load" copy: content: | autofs4 configfs efivarfs ext4 serio_raw virtio_blk virtio_pci dest: /etc/initramfs-tools/modules - name: "update initramfs and grub" shell: | update-initramfs -u update-grub - name: "unset root password" shell: | sed -i '/^root:[^:]*:/s//root::/' /etc/passwd - name: "create script to simulate build" copy: src: ./ambient-run-script dest: /bin/ambient-run-script mode: 0755 - name: "install systemd service unit to run build" copy: src: ambient-build.service dest: /etc/systemd/system/ambient-build.service - name: "make sure ambient-build.service is run at boot" shell: | ln -nsf /etc/systemd/system/ambient-build.service \ /etc/systemd/system/multi-user.target.wants/ambient-build.service vars: ansible_python_interpreter: /usr/bin/python3