Make all templates local, ensure ssh keys for amd64 builds are generated on first boot
This commit is contained in:
parent
0fa18af48e
commit
c22e6ed557
14 changed files with 459 additions and 59 deletions
|
|
@ -120,6 +120,7 @@ steps:
|
|||
unless: rootfs_unpacked
|
||||
|
||||
- shell: |
|
||||
|
||||
echo "butterbox" > "${ROOT?}/etc/hostname"
|
||||
|
||||
# Allow root logins locally with no password
|
||||
|
|
@ -149,6 +150,10 @@ steps:
|
|||
|
||||
- shell: |
|
||||
rm "${ROOT?}/etc/resolv.conf"
|
||||
mkdir -p "${ROOT?}/etc/systemd/system/multi-user.target.requires/"
|
||||
install -m 644 -o root -g root image-specs/rootfs/etc/systemd/system/rpi-generate-ssh-host-keys.service "${ROOT?}/etc/systemd/system/"
|
||||
ln -s "${ROOT?}/etc/systemd/system/rpi-generate-ssh-host-keys.service" "${ROOT?}/etc/systemd/system/multi-user.target.requires/rpi-generate-ssh-host-keys.service"
|
||||
rm -f "${ROOT?}"/etc/ssh/ssh_host_*_key*
|
||||
root-fs: tag-root
|
||||
|
||||
# Clear /etc/machine-id and /var/lib/dbus/machine-id, as both should
|
||||
|
|
@ -162,13 +167,14 @@ steps:
|
|||
# Note this will also trigger ConditionFirstBoot=yes for systemd.
|
||||
# On Buster, /etc/machine-id should be an emtpy file, not an absent file
|
||||
# On Bullseye, /etc/machine-id should not exist in an image
|
||||
#
|
||||
|
||||
- chroot: tag-root
|
||||
shell: |
|
||||
rm -f /etc/machine-id /var/lib/dbus/machine-id
|
||||
echo "uninitialized" > /etc/machine-id
|
||||
echo "LABEL=BOOT / ext4 rw 0 1" > /etc/fstab
|
||||
|
||||
|
||||
- virtual-filesystems: tag-root
|
||||
|
||||
- ansible: tag-root
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue