Add timeout to give instance enough time to boot
This commit is contained in:
parent
f20c08ae22
commit
fdb77a8699
1 changed files with 1 additions and 0 deletions
1
Makefile
1
Makefile
|
@ -6,6 +6,7 @@ default: terraform ansible
|
|||
ssh_setup:
|
||||
chmod 600 privkey.pem
|
||||
$(eval INSTANCE := $(shell terraform output instance_id | sed -e 's/"//g'))
|
||||
timeout 300 bash -c -- 'until $(SSH) $(INSTANCE) "/bin/true"; do sleep 0.5; done'
|
||||
|
||||
ansible: ssh_setup
|
||||
$(SSH) $(INSTANCE) "which -a ansible || (sudo apt-get update && sudo apt-get -y install ansible)"
|
||||
|
|
Loading…
Reference in a new issue