win_reboot: change to sample system uptime instead of checking port status (#31767)

* win_reboot: change to sample system uptime instead of checking port status

* added connection timeout back in as now we can manually set it per connection.

* some pep8 fixes

* fix up error message on timeout in case an exception wasn't fired

* Changed doc to English (US) and simplified uptime check

* moved conn timeout over to new config connection options
This commit is contained in:
Jordan Borean 2017-11-21 10:01:22 +10:00 committed by Matt Davis
commit cf662ed74b
3 changed files with 89 additions and 40 deletions

View file

@ -31,6 +31,7 @@ options:
description:
- Maximum seconds to wait for shutdown to occur
- Increase this timeout for very slow hardware, large update applications, etc
- This option has been removed since Ansible 2.5 as the win_reboot behavior has changed
default: 600
aliases: [ shutdown_timeout_sec ]
reboot_timeout:
@ -70,7 +71,6 @@ EXAMPLES = r'''
# Reboot a slow machine that might have lots of updates to apply
- win_reboot:
shutdown_timeout: 3600
reboot_timeout: 3600
'''