Issue 1:
FAILED! => {"changed": false, "error_record": {"CategoryInfo": {"Activity": "", "Category": 14, "Reason": "RuntimeException", "TargetName": "Timed out waiting for scheduled task to start", "TargetType": "String"}, "ErrorDetails": null, "Exception": {"Data": {}, "ErrorRecord": {"CategoryInfo": "NotSpecified: (:) [], ParentContainsErrorRecordException", "ErrorDetails": null, "Exception": "System.Management.Automation.ParentContainsErrorRecordException: Timed out waiting for scheduled task to start", "FullyQualifiedErrorId": "RuntimeException", "InvocationInfo": null, "PipelineIterationInfo": "", "ScriptStackTrace": null, "TargetObject": null}, "HResult": -2146233087, "HelpLink": null, "InnerException": null, "Message": "Timed out waiting for scheduled task to start", "Source": null, "StackTrace": null, "TargetSite": null, "WasThrownFromThrowStatement": true}, "FullyQualifiedErrorId": "Timed out waiting for scheduled task to start", "InvocationInfo": {"BoundParameters": {}, "CommandOrigin": 1, "DisplayScriptPosition": null, "ExpectingInput": false, "HistoryId": -1, "InvocationName": "", "Line": " Throw "Timed out waiting for scheduled task to start"\n", "MyCommand": null, "OffsetInLine": 9, "PSCommandPath": "C:\Users\Administrator\AppData\Local\Temp\ansible-tmp-1498743415.94-145663458112566\win_updates.ps1", "PSScriptRoot": "C:\Users\Administrator\AppData\Local\Temp\ansible-tmp-1498743415.94-145663458112566", "PipelineLength": 0, "PipelinePosition": 0, "PositionMessage": "At C:\Users\Administrator\AppData\Local\Temp\ansible-tmp-1498743415.94-145663458112566\win_updates.ps1:560 char:9\r\n+ Throw "Timed out waiting for scheduled task to start"\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", "ScriptLineNumber": 560, "ScriptName": "C:\Users\Administrator\AppData\Local\Temp\ansible-tmp-1498743415.94-145663458112566\win_updates.ps1", "UnboundArguments": []}, "PSMessageDetails": null, "PipelineIterationInfo": [], "ScriptStackTrace": "at RunAsScheduledJob, C:\Users\Administrator\AppData\Local\Temp\ansible-tmp-1498743415.94-145663458112566\win_updates.ps1: line 560\r\nat , C:\Users\Administrator\AppData\Local\Temp\ansible-tmp-1498743415.94-145663458112566\win_updates.ps1: line 646\r\nat , : line 4", "TargetObject": "Timed out waiting for scheduled task to start"}, "failed": true, "msg": "Timed out waiting for scheduled task to start"}

ISSUE TYPE

Bug Report

Feature Idea

Documentation Report

COMPONENT NAME

ANSIBLE VERSION

CONFIGURATION

OS / ENVIRONMENT

SUMMARY

STEPS TO REPRODUCE

EXPECTED RESULTS

ACTUAL RESULTS

Issue 2:
From @autogun on September 19, 2016 13:44

ISSUE TYPE

Bug Report

COMPONENT NAME

win_updates

ANSIBLE VERSION

ansible 2.1.1.0

config file = /etc/ansible/ansible.cfg

configured module search path = Default w/o overrides

CONFIGURATION

OS / ENVIRONMENT

Linux 3.10.0-327.28.3.el7.x86_64 #1 SMP Thu Aug 18 19:05:49 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

CentOS Linux release 7.2.1511 (Core)

SUMMARY

Testing around win_updates module, have two Windows servers in hosts file.

One is 2008R2 (Physical), the other one is 2012R2 (VM).

Both servers ping'ing successfully.

While trying to play the following playbook, I recieve a timeout

- name: Windows Updates
hosts: windows
gather_facts: yes
tasks:
- name: Search Windows Updates
win_updates: category_names=SecurityUpdates state=searched log_path=c:/ansible_wu.txt

PLAY [Windows Updates] *********************************************************

TASK [setup] *******************************************************************
ok: [2012R2]
ok: [2008R2]

TASK [Search Windows Updates] **************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fatal: [2012R2]: FAILED! => {"changed": false, "error_record": {"CategoryInfo": {"Activity": "", "Category": 14, "Reason": "RuntimeException", "TargetName": "Timed out waiting for scheduled task to start", "TargetType": "String"}, "ErrorDetails": null, "Exception": {"Data": {}, "ErrorRecord": {"CategoryInfo": "NotSpecified: (:) [], ParentContainsErrorRecordException", "ErrorDetails": null, "Exception": "System.Management.Automation.ParentContainsErrorRecordException: Timed out waiting for scheduled task to start", "FullyQualifiedErrorId": "RuntimeException", "InvocationInfo": null, "PipelineIterationInfo": "", "ScriptStackTrace": null, "TargetObject": null}, "HResult": -2146233087, "HelpLink": null, "InnerException": null, "Message": "Timed out waiting for scheduled task to start", "Source": null, "StackTrace": null, "TargetSite": null, "WasThrownFromThrowStatement": true}, "FullyQualifiedErrorId": "Timed out waiting for scheduled task to start", "InvocationInfo": {"BoundParameters": {}, "CommandOrigin": 1, "DisplayScriptPosition": null, "ExpectingInput": false, "HistoryId": -1, "InvocationName": "", "Line": " Throw \"Timed out waiting for scheduled task to start\"\n", "MyCommand": null, "OffsetInLine": 9, "PSCommandPath": "C:\Users\user\AppData\Local\Temp\ansible-tmp-1474289964.85-222578704616986\win_updates.ps1", "PSScriptRoot": "C:\Users\user\AppData\Local\Temp\ansible-tmp-1474289964.85-222578704616986", "PipelineLength": 0, "PipelinePosition": 0, "PositionMessage": "At C:\Users\user\AppData\Local\Temp\ansible-tmp-1474289964.85-222578704616986\win_updates.ps1:560 char:9\r\n+ Throw \"Timed out waiting for scheduled task to start\"\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", "ScriptLineNumber": 560, "ScriptName": "C:\Users\user\AppData\Local\Temp\ansible-tmp-1474289964.85-222578704616986\win_updates.ps1", "UnboundArguments": []}, "PSMessageDetails": null, "PipelineIterationInfo": [], "ScriptStackTrace": "at RunAsScheduledJob, C:\Users\user\AppData\Local\Temp\ansible-tmp-1474289964.85-222578704616986\win_updates.ps1: line 560\r\nat <ScriptBlock>, C:\Users\user\AppData\Local\Temp\ansible-tmp-1474289964.85-222578704616986\win_updates.ps1: line 646\r\nat <ScriptBlock>, <No file>: line 4", "TargetObject": "Timed out waiting for scheduled task to start"}, "failed": true, "msg": "Timed out waiting for scheduled task to start"}
ok: [2008R2]

NO MORE HOSTS LEFT *************************************************************
to retry, use: --limit @playbooks/WindowsUpdates.retry

PLAY RECAP *********************************************************************
WIN2012R2 : ok=1 changed=0 unreachable=0 failed=1
WIN2008R2 : ok=2 changed=0 unreachable=0 failed=0

Copied from original issue: ansible/ansible-modules-extras#2960