From 7daa536fe0731bd47fee2a20f0095c22bfcccfca Mon Sep 17 00:00:00 2001 From: Bryan Alexander Date: Mon, 3 Aug 2020 10:26:01 -0500 Subject: [PATCH] updates run.sh with region --- files/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/run.sh b/files/run.sh index 9f65259..b25a632 100644 --- a/files/run.sh +++ b/files/run.sh @@ -35,7 +35,7 @@ aws s3 cp --region ${region} s3://${bucket}/files/plugin.py /tmp/ansible/callbac # If /tmp/ansible/.env exists, then export all variables excluding lines beginning with # [ -f /tmp/ansible/.env ] && export $(egrep -v '^#' /tmp/ansible/.env | xargs) -ansible-playbook -v --private-key ${key_file} -u ${ec2_user} -e @/tmp/ansible/secrets.yaml -i ${hosts_file} ${site_file} +AWS_DEFAULT_REGION=${region} ansible-playbook -v --private-key ${key_file} -u ${ec2_user} -e @/tmp/ansible/secrets.yaml -i ${hosts_file} ${site_file} instance=$(curl http://169.254.169.254/latest/meta-data/instance-id)