Groups
Groups
Sign in
Groups
Groups
Ansible Project
Conversations
About
Send feedback
Help
how to wait for a windows machine to come up after rebooting?
510 views
Skip to first unread message
Sharwari Phadnis
unread,
Apr 15, 2016, 9:07:19 AM
4/15/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ansible Project
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 ?
J Hawkesworth
unread,
Apr 15, 2016, 1:28:02 PM
4/15/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ansible Project
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
Reply all
Reply to author
Forward
0 new messages