[ansible-project] Re: Ansible fails to connect to newly provisioned EC2 on 3rd task after successful running first 2 tasks

2017-11-16 Thread ddrake2012
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

Re: [ansible-project] Re: Ansible fails to connect to newly provisioned EC2 on 3rd task after successful running first 2 tasks

2017-11-16 Thread Matt Martz
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

Re: [ansible-project] Re: Ansible fails to connect to newly provisioned EC2 on 3rd task after successful running first 2 tasks

2017-12-08 Thread ddrake2012
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",