<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">win_reboot</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="2.4"><pre class="notranslate"><code class="notranslate">2.4
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<p dir="auto">default</p>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">any</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">If you run win_reboot and the host comes back within a very short period of time, the win_reboot action plugin will hang while waiting for the port to go offline before checking it is online. This has happened a few times with a brand new Windows install on vagrant with VirtualBox.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<p dir="auto">A bit hard to reproduce, I can do it on my end with my current image but install Windows with the latest ISO and the reboot time should be too quick for win_reboot to handle</p>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">win reboot to finish and continue along</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<p dir="auto">win_reboot eventually times out and the playbook is stopped.</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_reboot module</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.2.0.0"><pre class="notranslate"><code class="notranslate">ansible 2.2.0.0
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<p dir="auto">no special configs needed except username/password for winrm</p>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">Windows Server 2012R2 Datacenter</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">win_reboot never successfully continue after machine is rebooted, thus blocking playbook execution.</p>
<p dir="auto">The machine in question has in fact been rebooted and is available for connections.</p>
<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="- name: Reboot for changes to take effect
  win_reboot: reboot_timeout_sec=3600
              connect_timeout_sec=3600
              shutdown_timeout_sec=3600
"><pre class="notranslate">- <span class="pl-ent">name</span>: <span class="pl-s">Reboot for changes to take effect</span>
  <span class="pl-ent">win_reboot</span>: <span class="pl-s">reboot_timeout_sec=3600</span>
              <span class="pl-s">connect_timeout_sec=3600</span>
              <span class="pl-s">shutdown_timeout_sec=3600</span>
</pre></div>
<p dir="auto">With verbosity cranked up  this is the output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK [risklink-common : Reboot for changes to take effect] *********************
task path: /Users/kbooth/rms/rms-ansible/roles/risklink-common/tasks/main.yml:71
&lt;10.92.4.10&gt; ESTABLISH WINRM CONNECTION FOR USER: ***** on PORT 5986 TO 10.92.4.10
&lt;10.92.4.10&gt; EXEC shutdown /r /t 2
"><pre class="notranslate"><code class="notranslate">TASK [risklink-common : Reboot for changes to take effect] *********************
task path: /Users/kbooth/rms/rms-ansible/roles/risklink-common/tasks/main.yml:71
&lt;10.92.4.10&gt; ESTABLISH WINRM CONNECTION FOR USER: ***** on PORT 5986 TO 10.92.4.10
&lt;10.92.4.10&gt; EXEC shutdown /r /t 2

</code></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">Expect that ansible will detect machine is back online after reboot and continue executing plays</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<p dir="auto">Actual results are that ansible waits forever until timeout values are reached.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK [risklink-common : Reboot for changes to take effect] *********************
task path: /Users/kbooth/rms/rms-ansible/roles/risklink-common/tasks/main.yml:71
&lt;10.92.4.10&gt; ESTABLISH WINRM CONNECTION FOR USER: techops on PORT 5986 TO 10.92.4.10
&lt;10.92.4.10&gt; EXEC shutdown /r /t 2
"><pre class="notranslate"><code class="notranslate">TASK [risklink-common : Reboot for changes to take effect] *********************
task path: /Users/kbooth/rms/rms-ansible/roles/risklink-common/tasks/main.yml:71
&lt;10.92.4.10&gt; ESTABLISH WINRM CONNECTION FOR USER: techops on PORT 5986 TO 10.92.4.10
&lt;10.92.4.10&gt; EXEC shutdown /r /t 2

</code></pre></div>