fix propagation script

This commit is contained in:
Neil Hanlon 2022-10-07 17:11:28 -04:00 committed by Neil Hanlon
parent 0ea2b7fb48
commit 7c16cc2cdc
Signed by: neil
GPG Key ID: 705BC21EC3C70F34

View File

@ -21,7 +21,7 @@ SOURCE_AMI_NAME=$(aws --profile resf-ami ec2 describe-images \
# Enforce a name structure
# Rocky-8-ec2-8.6-20220515.0.x86_64
pat="Rocky-[89]-EC2-[89]\.[0-9]-[0-9]+\.[0-9]+\.((aarch|x86_)64|ppc64le|s390x)"
pat="Rocky-[89]-[Ee][Cc]2-[89]\.[0-9]-[0-9]+\.[0-9]+\.((aarch|x86_)64|ppc64le|s390x)"
if [[ ! "${SOURCE_AMI_NAME}" =~ $pat ]]; then
echo "Bad source ami (${SOURCE_AMI_NAME}). Exiting."
exit 1