Hi Matt,

You mention the async support is going to be put in 2.2. Is there any other 
workaround for this problem other than the win_scheduled_task module.
For example, can we use polling/pinging to see whether the connection is 
back up?

I have tried several methods but none seem to 
work, http://pastebin.com/PS82PnBF is what I came up with but even this 
freezes after installation.

Appreciate any help/advice.


On Tuesday, 3 May 2016 11:10:37 UTC-7, Matt Davis wrote:
>
> Depending on what you're trying to do, doing it as a scheduled task/script 
> might make sense in the interim (eg, see 
> http://docs.ansible.com/ansible/win_scheduled_task_module.html)
>
> On Tuesday, May 3, 2016 at 11:09:12 AM UTC-7, Matt Davis wrote:
>>
>> SSH seems to be very tolerant of momentary connection losses, so long as 
>> the connection isn't actually "refused". 
>>
>> WinRM under the covers is a very different beast (HTTP-based, logical 
>> connection instead of a single fixed TCP connection). It might be possible 
>> to retry certain parts of the WinRM exchange, but in general it's not safe 
>> to blanket retry requests (eg, you don't want to accidentally run something 
>> twice). The problem case is where a connectivity change like that happens 
>> before we receive the HTTP response from the Command/Send actions (retrying 
>> Receive would probably be OK).
>>
>> The "right" way to deal with this would probably be to use async, but 
>> that didn't make it in for Windows for 2.1 (should be in 2.2). Async 
>> *should* be tolerant of most kinds of dodgy/unstable connections...
>>
>>
>> On Tuesday, May 3, 2016 at 10:52:09 AM UTC-7, [email protected] 
>> <javascript:> wrote:
>>>
>>> I am running Windows modules that disrupt the network connection. For 
>>> instance, the installation of a network driver or the creation of a Network 
>>> Team. The IP address doesn't change, and the network connection is only out 
>>> for a few moments. But when these run, my Ansible playbook basically 
>>> freezes - it just sits there running the task until Ansible times out and 
>>> the playbook fails. My colleagues tell me Linux handles this gracefully, 
>>> reconnecting and continuing when the connection is back up. Any idea how I 
>>> can get this behavior with Windows?
>>>
>>

-- 
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/aea0dc9f-818e-4200-93b2-5c6036910a5e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to