[new cloud] ssh availability: revert to the dumb sleep

This commit is contained in:
Valentin Gologuzov 2015-04-02 14:32:02 +02:00
parent bb1df398dc
commit 5fad4d7aa5

View file

@ -39,16 +39,19 @@
local_action: wait_for host={{ public_ip }} port=22 delay=1 timeout=600
# We need to specify user, here we trying with fedora or root
- name: wait until ssh is available
# local_action: shell false; until [ "$?" -eq "0" ]; do sleep 2; ssh -o PasswordAuthentication=no fedora@{{ public_ip }} 'echo foobar' || ssh -o PasswordAuthentication=no root@{{ public_ip }} 'echo foobar'; done
#local_action: shell false; until [ "$?" -eq "0" ]; do sleep 2; ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PasswordAuthentication=no fedora@{{ public_ip }} 'echo foobar' &> /tmp/ssh_new_cloud.txt; done
local_action: shell whoami && ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PasswordAuthentication=no fedora@{{ public_ip }} 'echo foobar'
#async: 10
#poll: 2
register: ssh_check
ignore_errors: True
# Check is failing on the lockbox, something with ssh identity available for ssh invocation through the shell module,
# Using stupid timeout for not
- local_action: sleep 30
## We need to specify user, here we trying with fedora or root
#- name: wait until ssh is available
# # local_action: shell false; until [ "$?" -eq "0" ]; do sleep 2; ssh -o PasswordAuthentication=no fedora@{{ public_ip }} 'echo foobar' || ssh -o PasswordAuthentication=no root@{{ public_ip }} 'echo foobar'; done
# #local_action: shell false; until [ "$?" -eq "0" ]; do sleep 2; ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PasswordAuthentication=no fedora@{{ public_ip }} 'echo foobar' &> /tmp/ssh_new_cloud.txt; done
# local_action: shell whoami && ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PasswordAuthentication=no fedora@{{ public_ip }} 'echo foobar'
# #async: 10
# #poll: 2
# register: ssh_check
# ignore_errors: True
- debug: msg="{{ ssh_check }}"
#- debug: msg="{{ ssh_check }}"