I eventually fixed this by adding a retries parameter to the
[ssh_connection] section of my ansible.cfg so it looks like the below.
[ssh_connection]
ssh_args = -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no
retries = 10
Pretty lame! If anyone finds a better solution please let me
Perhaps the instance was not actually up and accessible yet. Did you use
`wait_for` or `wait_for_connection` after creating the instance to wait and
ensure they are up and accessible before moving on?
On Thu, Nov 16, 2017 at 10:35 AM, wrote:
> I eventually fixed this by adding a retries paramet
Yes, I use the wait parameter in the ec2 module. And the weirdest thing is
that two of the tasks work before the third fails, so the connection is up
and working and then just stops working. I've seen this when uploading
files as well with messages like "the sftp file transfer mechansi failed",