tools/appsre-build-worker-packer: Use ssh instead of ssh-keyscan

`ssh-keyscan` on appsre's infra has a bug where it doesn't exit 1 in
case of failure.
This commit is contained in:
sanne 2022-01-12 10:51:10 +01:00 committed by Sanne Raymaekers
parent a83cf95d5b
commit 01163a1384

View file

@ -106,11 +106,10 @@ function ec2_rpm_build {
for LOOP_COUNTER in {0..30}; do
if ssh-keyscan "$RPMBUILDER_HOST" > /dev/null 2>&1; then
if ssh -i ./keypair.pem -o ConnectTimeout=10 -o StrictHostKeyChecking=no "$RPMBUILDER_HOST" true > /dev/null 2>&1; then
break
fi
echo "sleeping, try #$LOOP_COUNTER"
sleep 10
done
cat > tools/appsre-ansible/inventory <<EOF