# ansible failing on windows machines that used to work

**URL:** <https://forum.ansible.com/t/ansible-failing-on-windows-machines-that-used-to-work/30911>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [July 30, 2019, 9:45pm UTC](https://forum.ansible.com/t/ansible-failing-on-windows-machines-that-used-to-work/30911 "2019-07-30T21:45:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![william.dossett](https://avatars.discourse-cdn.com/v4/letter/w/b782af/32.png) [@william.dossett](https://forum.ansible.com/u/william.dossett)\
**Post date:** [July 30, 2019, 9:45pm UTC](https://forum.ansible.com/t/ansible-failing-on-windows-machines-that-used-to-work/30911/1 "2019-07-30T21:45:20Z")

</div>

I have about 90 windows VMs that I use ansible on to configure and pull windows updates.

I upgraded from ansible 2.7 to 2.8.1 - I think thats when this started.

The windows server are all 2008 R2.

Today when I try to run a playbook against them that does a simple win\_regmerge, it get thru 3 of the windows servers and then just hangs.

Running with -vvvv shows me which vm it hangs on

`

Using module file /usr/lib/python2.7/site-packages/ansible/modules/windows/win\_regmerge.ps1  
Pipelining is enabled.  
 ESTABLISH WINRM CONNECTION FOR USER: user@my.domain on PORT 5986 TO covmgrid18  
calling kinit with subprocess for principal user@my.domain  
EXEC (via pipeline wrapper)

`

running test-wsman against the VM is successful. Checked firewall is not enabled. I have let it sit for over 30 minutes and nothing happens. I rebooted the VM no difference… when I rebooted, it then said unreachable and went to the next VM where it hangs again. I can’t see any difference between the ones that work and the ones that do not and the all used to work with 2.7.

I’ve been stuck on this all afternoon and am out of ideas other than to regress to 2.7 - but just wondered if anyone else had seen anything similar.

Regards  
Bill

---

<div class="post-metadata">

**Author:** ![jborean](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jborean/32/1525_2.png) [@jborean](https://forum.ansible.com/u/jborean)\
**Post date:** [July 30, 2019, 11:06pm UTC](https://forum.ansible.com/t/ansible-failing-on-windows-machines-that-used-to-work/30911/2 "2019-07-30T23:06:20Z")

</div>

It could be due to various reasons but you need to figure out where it is hanging, can you see;

- If there is a running powershell.exe process on your Windows host, try and check when the task actually runs to see if the process ran and finished

- Can you see any network traffic between the Ansible controller and the remote hsot

- Are any or all the registry changes being applied

- Does other modules like win\_ping work

- Can you use the raw module?

Thanks

Jordan

---

<div class="post-metadata">

**Author:** ![william.dossett](https://avatars.discourse-cdn.com/v4/letter/w/b782af/32.png) [@william.dossett](https://forum.ansible.com/u/william.dossett)\
**Post date:** [July 31, 2019, 2:24pm UTC](https://forum.ansible.com/t/ansible-failing-on-windows-machines-that-used-to-work/30911/3 "2019-07-31T14:24:43Z")

</div>

Answers below… it seems to have something to do with become. I commented out all of the become in the playbook and then it actually runs thru all the hosts, failing on the ones that were hanging before.

I am now getting errors that look like they pertain to:

win\_updates fails on Windows 2008 R2 fails on Ansible 2.7.1, works on 2.6.4 #47874

So I am digging thru that – but I am on 2.8.1 – now that it goes thru the whole host list, it appears about 50% are failing. These were all made from the same VMware template.

I am continuing to dig, but if this means anything to anyone I appreciate any further input!

---

<div class="post-metadata">

**Author:** ![william.dossett](https://avatars.discourse-cdn.com/v4/letter/w/b782af/32.png) [@william.dossett](https://forum.ansible.com/u/william.dossett)\
**Post date:** [July 31, 2019, 3:14pm UTC](https://forum.ansible.com/t/ansible-failing-on-windows-machines-that-used-to-work/30911/4 "2019-07-31T15:14:41Z")

</div>

upgrading to PS 4 worked on one host… so I assume that will solve my problems…

Thanks  
Bill
