packer: make subscribing optional
We don't want to subscribe Fedora. Signed-off-by: Ondřej Budai <ondrej@budai.cz>
This commit is contained in:
parent
c46376aea2
commit
424a741de6
1 changed files with 5 additions and 0 deletions
|
|
@ -4,6 +4,11 @@ source /tmp/cloud_init_vars
|
|||
|
||||
echo "Subscribing instance to RHN."
|
||||
|
||||
if [[ -z "$SUBSCRIPTION_MANAGER_COMMAND_ARN" ]]; then
|
||||
echo "SUBSCRIPTION_MANAGER_COMMAND_ARN not defined, skipping."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Register the instance with RHN.
|
||||
# TODO: don't store the command in a secret, only the key/org-id
|
||||
/usr/local/bin/aws secretsmanager get-secret-value \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue