Step 1: Set up your Ansible Control Machine outside of the country closer 
to your target machines.
Step 2: Learn Tmux or Screen
Step 3: Run 'ansible-playbook' in Tmux or Screen on your new Control 
Machine.


On Thursday, May 5, 2016 at 4:21:04 PM UTC+10, nrser wrote:
>
> this is preventing me from deploying so it's kind of a serious and 
> time-sensitive issue....
>
> i'm in China and the internet connection out of the country (to where our 
> servers are) is unstable.
>
> i've been trying to run a playbook with around 12 tasks for an hour or two 
> now, and the whole thing fails seemingly if it can't connect once:
>
> UNREACHABLE! => {"changed": false, "msg": "SSH Error: data could not be 
> sent to the remote host. Make sure this host can be reached over ssh", 
> "unreachable": true}
>
> it looks like ansible is creating a new ssh connection for *each play*:
>
> ESTABLISH SSH CONNECTION FOR USER: root
>
> SSH: EXEC ssh -C -vvv -o ServerAliveInterval=1 -o 
> KbdInteractiveAuthentication=no ...
>
> before each task, and it seems to give up completely if it fails to open a 
> connection at any time. this makes it essentially impossible to get through 
> the playbook.
>
> i can hold an ssh terminal open with the server no problem... what's going 
> on here? is ansible creating a new connection for every task? can i make it 
> just hold one connection open and use that? can i make it retry a few times 
> if it can't connect?
>
> thanks in advance, Neil.
>

-- 
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/36f76982-dcb4-4f5b-9f03-34555bb0f94b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to