# Windows updates found but not installed

**URL:** <https://forum.ansible.com/t/windows-updates-found-but-not-installed/32302>\
**Category:** Ansible Project\
**Tags:** windows, awx\
**Created:** [February 22, 2020, 2:38pm UTC](https://forum.ansible.com/t/windows-updates-found-but-not-installed/32302 "2020-02-22T14:38:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![astrakid](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/astrakid/32/1789_2.png) [@astrakid](https://forum.ansible.com/u/astrakid)\
**Post date:** [February 22, 2020, 2:38pm UTC](https://forum.ansible.com/t/windows-updates-found-but-not-installed/32302/1 "2020-02-22T14:38:35Z")

</div>

hi,  
i tried to update some sql-servers with ansible (awx).  
overall it worked fine, but some updates (latest sql-server 2016 sp2 and .bnet-framework) werde detected referring to windows updsate logfile but not installed.  
whe installing those updates manually on some servers ifound further updates for office that have not been installed.

how can i install those updates by windows update module in ansible? i tried different categories for the update, but it didn’t change anything.  
any help would be appreciated.

kind regards,  
andre

---

<div class="post-metadata">

**Author:** ![dan\_linder](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/dan_linder/32/3833_2.png) [@dan\_linder](https://forum.ansible.com/u/dan_linder)\
**Post date:** [February 23, 2020, 8:15pm UTC](https://forum.ansible.com/t/windows-updates-found-but-not-installed/32302/2 "2020-02-23T20:15:59Z")

</div>

Can you include a simplified playbook showing the steps you’re performing?

Were the systems pending a reboot from a previous update?

---

<div class="post-metadata">

**Author:** ![astrakid](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/astrakid/32/1789_2.png) [@astrakid](https://forum.ansible.com/u/astrakid)\
**Post date:** [February 24, 2020, 4:13am UTC](https://forum.ansible.com/t/windows-updates-found-but-not-installed/32302/3 "2020-02-24T04:13:36Z")

</div>

hi,  
there should not be a pending reboot, because i rebooted the servers before and tested lots of things.  
this is the playbook:

`

- name: Install Windows Updates  
hosts: all  
tasks:
- name: Install all security, critical, and rollup updates without a scheduled task  
win\_updates:  
category\_names:
- SecurityUpdates
- CriticalUpdates
- ServicePacks
- UpdateRollups  
server\_selection:
- windows\_update  
reboot: yes  
reboot\_timeout: 3600  
become: yes  
become\_method: runas  
become\_user: SYSTEM

`

---

<div class="post-metadata">

**Author:** ![astrakid](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/astrakid/32/1789_2.png) [@astrakid](https://forum.ansible.com/u/astrakid)\
**Post date:** [February 25, 2020, 1:00pm UTC](https://forum.ansible.com/t/windows-updates-found-but-not-installed/32302/4 "2020-02-25T13:00:26Z")

</div>

hi, i had a look into the issue again.  
it seems that some updates were filtered because of the categories. that is ok (.net is featurepack). but i don’t know why the sql server sp2 gdr wasn’t found ([https://support.microsoft.com/en-us/help/4532097/description-of-the-security-update-for-sql-server-2016-sp2-gdr-feb](https://support.microsoft.com/en-us/help/4532097/description-of-the-security-update-for-sql-server-2016-sp2-gdr-feb))

any idea? manually i was able to install it on the server, it was found immediately when searching for updates.

---

<div class="post-metadata">

**Author:** ![dan\_linder](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/dan_linder/32/3833_2.png) [@dan\_linder](https://forum.ansible.com/u/dan_linder)\
**Post date:** [February 29, 2020, 8:50pm UTC](https://forum.ansible.com/t/windows-updates-found-but-not-installed/32302/5 "2020-02-29T20:50:00Z")

</div>

I’d suggest removing the category\_names and server\_selection fields and see if the missing patches are applied. I don’t do Windows patching, but it might be that the “sql server sp2 gdr” is in a different category or server selection.

The “category\_names” looks like it is a dynamic list that is dependent on the Windows system being patched. The documentation for the “win\_updates” module states that the possible category names can be produced by running the module in “state=searched” - possibly that would help you find a missing category name?

---

<div class="post-metadata">

**Author:** ![astrakid](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/astrakid/32/1789_2.png) [@astrakid](https://forum.ansible.com/u/astrakid)\
**Post date:** [March 1, 2020, 5:02pm UTC](https://forum.ansible.com/t/windows-updates-found-but-not-installed/32302/6 "2020-03-01T17:02:06Z")

</div>

When the category is not set the default is used, which is [“CriticalUpdates”, “SecurityUpdates”, “UpdateRollups”].  
will try with state=searched and test if the update is installed with the category set what state=searched gives me.

thanks for your support,  
regards,  
andre
