- name: Wait for SSH to come up {{ ansible_ssh_host }}
wait_for: host={{ ansible_ssh_host }} port=999 delay=60 timeout=500 state=started
delegate_to: 127.0.0.1
sudo: false
Output:
PLAY [ec2] *********************************************************************
TASK [post-provision : Wait for SSH to come up 52.30.36.107] ******************
task path: ****/main.yml:2
<52.30.36.107> ESTABLISH SSH CONNECTION FOR USER: admin-x
<52.30.36.107> SSH: EXEC ssh -C -q -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=999 -o 'IdentityFile="key"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=adminx -o ConnectTimeout=10 -o ControlPath=/Users/alejandrog/.ansible/cp/ansible-ssh-%h-%p-%r 52.30.36.107 '/bin/sh -c '"'"'LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python'"'"''
fatal: [testa-gw-i.domain.com]: UNREACHABLE! => {"changed": false, "msg": "SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh", "unreachable": true}
Thanks for your help and I hope someone can shred some light on this.
Regards,
Alejandro Gandara