There is a win_reboot role on Galaxy which will do this for you.

Also there is a Pull Request (not yet merged) for a win_reboot action here 
https://github.com/ansible/ansible/pull/15314

If you can help out with testing the reboot action that would make it more 
likely to get included in the next release of Ansible.

Hope this helps,

Jon

On Friday, April 15, 2016 at 2:07:19 PM UTC+1, Sharwari Phadnis wrote:
>
> I am trying to reboot a windows machine and I want to wait for it come up. 
> I tried the following playbook:
>
> ---
> - hosts: windows
>   tasks: 
>      - name: Reboot windows
>        raw: shutdown /r /f 
>     
>      - name: ping windows machine until it comes up
>        action: win_ping
>        register: result
>        until: result.rc == 0
>        retries: 30
>        delay: 20
>  
> But, it is not working somehow. Is there any other way I can reboot the 
> windows 10 machine and wait for it come up ?
>

-- 
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/2ee86262-fca3-4ba3-b541-8141b129ff3d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to