tests(packer): success on cloud-init failure.

This commit is contained in:
Alexandre Pujol 2025-09-06 13:23:49 +02:00
parent d9df02f3f8
commit 5795114328
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
2 changed files with 3 additions and 4 deletions

View file

@ -71,10 +71,10 @@ build {
"while [ ! -f /var/lib/cloud/instance/boot-finished ]; do echo 'Waiting for Cloud-Init...'; sleep 20; done",
# Ensure cloud-init is successful
# "cloud-init status",
"cloud-init status || cloud-init collect-logs --tarfile /root/cloud-init.tar.gz",
# Remove logs and artifacts so cloud-init can re-run
# "cloud-init clean",
"cloud-init clean || true",
# Install local files and config
"bash /tmp/init.sh",

View file

@ -60,8 +60,7 @@ clean_pacman() {
clean_zypper() {
_msg "Cleaning zypper cache"
zypper update -y
zypper clean -y
zypper clean --all
}
# Make the image as impersonal as possible.