# Unable to install Windows Updates using Ansible 'win\_update' Module

**URL:** <https://forum.ansible.com/t/unable-to-install-windows-updates-using-ansible-win-update-module/27500>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [May 10, 2018, 8:46am UTC](https://forum.ansible.com/t/unable-to-install-windows-updates-using-ansible-win-update-module/27500 "2018-05-10T08:46:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dinesh\_Vashisht](https://avatars.discourse-cdn.com/v4/letter/d/2acd7d/32.png) [@Dinesh\_Vashisht](https://forum.ansible.com/u/Dinesh_Vashisht)\
**Post date:** [May 10, 2018, 8:46am UTC](https://forum.ansible.com/t/unable-to-install-windows-updates-using-ansible-win-update-module/27500/1 "2018-05-10T08:46:15Z")

</div>

Hello Team,

We’re using the ‘win\_updates’ module for installing Windows updates on servers, following is the playbook section:

tasks:

- name: Applying Security Windows Updates  
win\_updates:  
category\_name:
- SecurityUpdates
- UpdateRollups  
whitelist:
- KB2992611
- KB4103730  
log\_path: C:\ansible\_wu.txt  
register: wuout

Even after white listing these updates, they were not installed. Following are the logs:

2018-05-09 23:57:46Z Skipping update c5406426-d347-4a93-acbb-e595a00a4fb8 - Security Update for Windows Server 2012 (KB2992611) as it was not found in the whitelist

2018-05-09 23:57:46Z Skipping update bfdb9786-0c43-40be-ab19-654fc8d32dd8 - 2018-05 Security Monthly Quality Rollup for Windows Server 2012 for x64-based Systems (KB4103730) as it was not found in the whitelist

What could be the reason and how can we resolve this issue?

Thank you,  
Dinesh

---

<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:** [May 14, 2018, 4:14am UTC](https://forum.ansible.com/t/unable-to-install-windows-updates-using-ansible-win-update-module/27500/2 "2018-05-14T04:14:02Z")

</div>

This sounds like it could be an issue with the whitelist functionality of win\_updates. I know I had it working for single updates but can’t fully remember if I tested it with multiple updates but I thought I did. Can you raise an issue with these details at [https://github.com/ansible/ansible/issues](https://github.com/ansible/ansible/issues) and I will get round to testing it sometime soon.

Thanks

Jordan

---

<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:** [May 16, 2018, 8:54pm UTC](https://forum.ansible.com/t/unable-to-install-windows-updates-using-ansible-win-update-module/27500/3 "2018-05-16T20:54:52Z")

</div>

Found the issue and have raised a PR to fix it. If you can test it out that would be great [https://github.com/ansible/ansible/pull/40283](https://github.com/ansible/ansible/pull/40283).

Thanks

Jordan

---

<div class="post-metadata">

**Author:** ![Dinesh\_Vashisht](https://avatars.discourse-cdn.com/v4/letter/d/2acd7d/32.png) [@Dinesh\_Vashisht](https://forum.ansible.com/u/Dinesh_Vashisht)\
**Post date:** [June 28, 2018, 1:31pm UTC](https://forum.ansible.com/t/unable-to-install-windows-updates-using-ansible-win-update-module/27500/4 "2018-06-28T13:31:03Z")

</div>

> Jordan,

After replacing the win\_updates.ps1 module with the one shared in the above link the problem is resolved.

Now we can install multiple updates by whitelisting them.

Thank you,  
Dinesh
