tools/appsre-build-worker-packer: Add image_users variable

packer will share the ami with those users.
This commit is contained in:
sanne 2022-01-10 16:56:12 +01:00 committed by Ondřej Budai
parent 2420504e1d
commit 3c729be3c5
3 changed files with 15 additions and 0 deletions

View file

@ -143,6 +143,13 @@ else
SKIP_TAGS="rpmrepo"
fi
# Format: PACKER_IMAGE_USERS="\"000000000000\",\"000000000001\""
if [ -n "$PACKER_IMAGE_USERS" ]; then
cat > templates/packer/share.auto.pkrvars.hcl <<EOF
image_users = [$PACKER_IMAGE_USERS]
EOF
fi
greenprint "🖼️ Building the image using packer container"
# Use an absolute path to packer binary to avoid conflicting cracklib-packer symling in /usr/sbin,
# installed during ansible installation process