openvidu-deployment: replicate_amis.sh: Print AMI_LIST in case of failure we can delete all failed AMIs (OpenVidu CE)

pull/576/head
cruizba 2020-12-10 12:25:01 +01:00
parent 2e0332f405
commit 4a62010bff
1 changed files with 21 additions and 8 deletions

View File

@ -99,6 +99,19 @@ if [[ ${UPDATE_CF} == "true" ]]; then
fi fi
fi fi
AMI_LIST=""
ITER=0
for i in "${AMI_IDS[@]}"
do
AMI_ID=${AMI_IDS[$ITER]}
REGION=${REGIONS[$ITER]}
if [[ ${ITER} -eq 0 ]]; then
AMI_LIST="${REGION}:${AMI_ID}"
fi
AMI_LIST="${AMI_LIST},${REGION}:${AMI_ID}"
ITER=$(expr $ITER + 1)
done
echo "AMI_LIST: ${AMI_LIST}"
# Cleaning the house # Cleaning the house
rm "${REPLICATED_AMIS_FILE}" rm "${REPLICATED_AMIS_FILE}"