templates/packer: don't subscribe fedora executor

This commit is contained in:
Sanne Raymaekers 2024-02-14 13:10:43 +01:00
parent 7fd150b938
commit f03dac5834

View file

@ -1,10 +1,14 @@
#!/bin/bash
set -euo pipefail
/usr/local/bin/aws secretsmanager get-secret-value \
--secret-id executor-subscription-manager-command | jq -r ".SecretString" > /tmp/subscription_manager_command.json
jq -r ".subscription_manager_command" /tmp/subscription_manager_command.json | bash
rm -f /tmp/subscription_manager_command.json
# Don't subscribe on fedora
source /etc/os-release
if [ "$ID" != fedora ]; then
/usr/local/bin/aws secretsmanager get-secret-value \
--secret-id executor-subscription-manager-command | jq -r ".SecretString" > /tmp/subscription_manager_command.json
jq -r ".subscription_manager_command" /tmp/subscription_manager_command.json | bash
rm -f /tmp/subscription_manager_command.json
fi
echo "Starting osbuild-jobsite-builder."
/usr/libexec/osbuild-composer/osbuild-jobsite-builder