You don't want to match the sleep/async values- the ansible watchdog 
wrapper will always kill it during the sleep if you do that. The async 
value is the *maximum* allowed exec time in seconds for the task, and is 
enforced on both the control side and the managed side. The sleep 
beforehand can be very short (and oftentimes isn't needed at all), but you 
want an async value that's at least several seconds longer than the max 
time you think the command will take to return (doesn't really matter how 
high you set it, as the watchdog will get nuked on the reboot anyway in the 
"happy path").

I haven't run into a distro where I couldn't get this working *fairly* 
reliably, but the only guaranteed way is via a control-side action where 
you can handle/ignore the race where the shutdown occurs before the command 
output has returned to the controller (this is exactly how both win_reboot 
and the forthcoming reboot actions work, though the new one works at a 
little higher level). 

-Matt

On Monday, December 19, 2016 at 5:07:09 PM UTC-8, Chris Parish wrote:
>
> What is frustrating is that this used to work. Then my Raspberry PI's 
> upgraded to Jessie and ansible to 2.2 and none of my reboots will work any 
> more.
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/82716d71-d5fe-42a8-89dd-a2e22d988b9f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to