From 5fad4d7aa5e03a1cc84334e4540061ef51961d94 Mon Sep 17 00:00:00 2001 From: Valentin Gologuzov Date: Thu, 2 Apr 2015 14:32:02 +0200 Subject: [PATCH] [new cloud] ssh availability: revert to the dumb sleep --- tasks/persistent_cloud_new.yml | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/tasks/persistent_cloud_new.yml b/tasks/persistent_cloud_new.yml index 8016381953..5baac21734 100644 --- a/tasks/persistent_cloud_new.yml +++ b/tasks/persistent_cloud_new.yml @@ -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 }}"