Yep, that's a thing.

Typically you'll only need to pause a few seconds after an SSH port comes
up and before you can connect.

I'd reduce the 1 minute pause to only 5 seconds (immediately following the
existing wait_for task), 10 if you are feeling like it.


On Sun, Sep 7, 2014 at 4:08 PM, Cynthia Hertzer <[email protected]> wrote:

> I had an issue that initially looked similar to this. I pored over this
> thread carefully, trying a number of different things. I found a workaround
> I hadn't seen mentioned and wanted to mention it here in case this is
> useful for others.
>
> Background/Environment:
> Ansible 1.7.1 on OSX, provisioning and CentOS 6.5 EC2 instance
>
> My goal was to write scripts to dynamically determine the IP of an EC2
> instance, then run yum update/installs against that new instance.
>
> wait_for ssh consistently indicated that I'd correctly gained the IP of
> the new instance, and something was answering at the ssh port, but ssh
> -vvvv debug output would indicate yum installs failed because ssh to the
> instance was failing. The ssh trace looked nearly identical to debug traces
> from successful manual command-line ssh tests until it failed at the end.
>
> debug2: we did not send a packet, disable method
> debug1: No more authentication methods to try.
> Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password)
>
> I was suspicious that ssh was being run against the wrong user, but the
> ansible debug output said it was using the user id I'd specified.
>
> *Workaround: *I added a 1min pause before trying to run yum and have
> concluded that there was a race condition where the key had not been
> installed on the EC2 instance when ansible first tried to ssh there to run
> yum.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/b4e0d2a5-d26c-4b3a-adc0-ab8598265756%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/b4e0d2a5-d26c-4b3a-adc0-ab8598265756%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgyKtz2bTRuOQWHoy%2BZ_YZo6oWDUaF6t58jrQkpUvK53ng%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to