Hello,
I am trying to create a custom raspberry image starting from the code here
https://salsa.debian.org/raspi-team/image-specs
I added the ansible step in this file
raspi_master.yaml:
- apt: install
packages:
- ansible
- python3
- ca-certificates
- dosfstools
- iw
- parted
- ssh
- wpasupplicant
- systemd-timesyncd
- __LINUX_IMAGE__
- raspi-firmware
- __WIRELESS_FIRMWARE__
- __BLUETOOTH_FIRMWARE__
tag: tag-root
unless: rootfs_unpacked
- ansible: tag-root
playbook: ansible/image.yaml
- cache-rootfs: tag-root
unless: rootfs_unpacked
Then I created the folder and file ansible/image.yaml whit this content
- hosts: image
tasks:
- name: "set /etc/hostname"
shell: |
echo "{{ hostname }}" > /etc/hostname
vars:
hostname: discworld
When I run:
make raspi_3_bookworm.img
The output is:
Exec: ['chroot', '/tmp/tmpz7n89mb7', 'apt-get', 'clean']
Created /tmp/tmpvcwo8eje for Ansible inventory
Created /tmp/tmp3achsgue.yaml for Ansible variables
Exec: ['ansible-playbook', '-c', 'chroot', '-i', '/tmp/tmpvcwo8eje', '--tags', 'all', '-e', '@/tmp/tmp3achsgue.yaml', 'ansible/image.yaml']
ERROR: Program failed: 1
ERROR: RuncmdError('Program failed: 1')
Something went wrong, cleaning up!
Removing /tmp/tmp3achsgue.yaml
Removing /tmp/tmpvcwo8eje
Exec: ['zerofree', '-v', '/dev/mapper/loop0p2']
Exec: ['kpartx', '-dsv', 'raspi_3_bookworm.img']
Exec: ['losetup', '--json', '-l', '/dev/loop0']
Command exited with non-zero status 1
I confirm all the dependencies listed on the remote are installed, also ansible is installed...
So what I am doing wrong ??
Thanks in advance
Stefano