<p dir="auto">FAILED! =&gt; {"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"}</p>
<h5 dir="auto">ISSUE TYPE</h5>

<ul dir="auto">
<li>Bug Report</li>
<li>Feature Idea</li>
<li>Documentation Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>

<h5 dir="auto">ANSIBLE VERSION</h5>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate">
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>

<h5 dir="auto">OS / ENVIRONMENT</h5>

<h5 dir="auto">SUMMARY</h5>

<h5 dir="auto">STEPS TO REPRODUCE</h5>


<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"></pre></div>

<h5 dir="auto">EXPECTED RESULTS</h5>

<h5 dir="auto">ACTUAL RESULTS</h5>


<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate">
</code></pre></div>
<p dir="auto"><em>From @autogun on September 19, 2016 13:44</em></p>

<h5 dir="auto">ISSUE TYPE</h5>

<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">win_updates</p>
<h5 dir="auto">ANSIBLE VERSION</h5>

<p dir="auto">ansible 2.1.1.0<br>
config file = /etc/ansible/ansible.cfg<br>
configured module search path = Default w/o overrides</p>
<h5 dir="auto">CONFIGURATION</h5>

<h5 dir="auto">OS / ENVIRONMENT</h5>

<p dir="auto">Linux  3.10.0-327.28.3.el7.x86_64 <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3525390" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible/issues/1" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible/issues/1/hovercard" href="https://github.com/ansible/ansible/issues/1">#1</a> SMP Thu Aug 18 19:05:49 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux<br>
CentOS Linux release 7.2.1511 (Core)</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">Testing around win_updates module, have two Windows servers in hosts file.<br>
One is 2008R2 (Physical), the other one is 2012R2 (VM).<br>
Both servers ping'ing successfully.</p>
<p dir="auto">While trying to play the following playbook, I recieve a timeout</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="- 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"><pre class="notranslate">- <span class="pl-ent">name</span>: <span class="pl-s">Windows Updates</span>
  <span class="pl-ent">hosts</span>: <span class="pl-s">windows</span>
  <span class="pl-ent">gather_facts</span>: <span class="pl-s">yes</span>
  <span class="pl-ent">tasks</span>:
  - <span class="pl-ent">name</span>: <span class="pl-s">Search Windows Updates</span>
    <span class="pl-ent">win_updates</span>: <span class="pl-s">category_names=SecurityUpdates state=searched log_path=c:/ansible_wu.txt</span></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="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! =&gt; {&quot;changed&quot;: false, &quot;error_record&quot;: {&quot;CategoryInfo&quot;: {&quot;Activity&quot;: &quot;&quot;, &quot;Category&quot;: 14, &quot;Reason&quot;: &quot;RuntimeException&quot;, &quot;TargetName&quot;: &quot;Timed out waiting for scheduled task to start&quot;, &quot;TargetType&quot;: &quot;String&quot;}, &quot;ErrorDetails&quot;: null, &quot;Exception&quot;: {&quot;Data&quot;: {}, &quot;ErrorRecord&quot;: {&quot;CategoryInfo&quot;: &quot;NotSpecified: (:) [], ParentContainsErrorRecordException&quot;, &quot;ErrorDetails&quot;: null, &quot;Exception&quot;: &quot;System.Management.Automation.ParentContainsErrorRecordException: Timed out waiting for scheduled task to start&quot;, &quot;FullyQualifiedErrorId&quot;: &quot;RuntimeException&quot;, &quot;InvocationInfo&quot;: null, &quot;PipelineIterationInfo&quot;: &quot;&quot;, &quot;ScriptStackTrace&quot;: null, &quot;TargetObject&quot;: null}, &quot;HResult&quot;: -2146233087, &quot;HelpLink&quot;: null, &quot;InnerException&quot;: null, &quot;Message&quot;: &quot;Timed out waiting for scheduled task to start&quot;, &quot;Source&quot;: null, &quot;StackTrace&quot;: null, &quot;TargetSite&quot;: null, &quot;WasThrownFromThrowStatement&quot;: true}, &quot;FullyQualifiedErrorId&quot;: &quot;Timed out waiting for scheduled task to start&quot;, &quot;InvocationInfo&quot;: {&quot;BoundParameters&quot;: {}, &quot;CommandOrigin&quot;: 1, &quot;DisplayScriptPosition&quot;: null, &quot;ExpectingInput&quot;: false, &quot;HistoryId&quot;: -1, &quot;InvocationName&quot;: &quot;&quot;, &quot;Line&quot;: &quot;        Throw \&quot;Timed out waiting for scheduled task to start\&quot;\n&quot;, &quot;MyCommand&quot;: null, &quot;OffsetInLine&quot;: 9, &quot;PSCommandPath&quot;: &quot;C:\Users\user\AppData\Local\Temp\ansible-tmp-1474289964.85-222578704616986\win_updates.ps1&quot;, &quot;PSScriptRoot&quot;: &quot;C:\Users\user\AppData\Local\Temp\ansible-tmp-1474289964.85-222578704616986&quot;, &quot;PipelineLength&quot;: 0, &quot;PipelinePosition&quot;: 0, &quot;PositionMessage&quot;: &quot;At C:\Users\user\AppData\Local\Temp\ansible-tmp-1474289964.85-222578704616986\win_updates.ps1:560 char:9\r\n+         Throw \&quot;Timed out waiting for scheduled task to start\&quot;\r\n+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&quot;, &quot;ScriptLineNumber&quot;: 560, &quot;ScriptName&quot;: &quot;C:\Users\user\AppData\Local\Temp\ansible-tmp-1474289964.85-222578704616986\win_updates.ps1&quot;, &quot;UnboundArguments&quot;: []}, &quot;PSMessageDetails&quot;: null, &quot;PipelineIterationInfo&quot;: [], &quot;ScriptStackTrace&quot;: &quot;at RunAsScheduledJob, C:\Users\user\AppData\Local\Temp\ansible-tmp-1474289964.85-222578704616986\win_updates.ps1: line 560\r\nat &lt;ScriptBlock&gt;, C:\Users\user\AppData\Local\Temp\ansible-tmp-1474289964.85-222578704616986\win_updates.ps1: line 646\r\nat &lt;ScriptBlock&gt;, &lt;No file&gt;: line 4&quot;, &quot;TargetObject&quot;: &quot;Timed out waiting for scheduled task to start&quot;}, &quot;failed&quot;: true, &quot;msg&quot;: &quot;Timed out waiting for scheduled task to start&quot;}
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"><pre class="notranslate"><code class="notranslate">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! =&gt; {"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 &lt;ScriptBlock&gt;, C:\Users\user\AppData\Local\Temp\ansible-tmp-1474289964.85-222578704616986\win_updates.ps1: line 646\r\nat &lt;ScriptBlock&gt;, &lt;No file&gt;: 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
</code></pre></div>
<p dir="auto"><em>Copied from original issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="177788425" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible-modules-extras/issues/2960" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible-modules-extras/issues/2960/hovercard" href="https://github.com/ansible/ansible-modules-extras/issues/2960">ansible/ansible-modules-extras#2960</a></em></p>