# Ansible.windows.win\_updates not installing every update

**URL:** <https://forum.ansible.com/t/ansible-windows-win-updates-not-installing-every-update/7673>\
**Category:** Get Help\
**Tags:** windows\
**Created:** [August 6, 2024, 2:23pm UTC](https://forum.ansible.com/t/ansible-windows-win-updates-not-installing-every-update/7673 "2024-08-06T14:23:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![HSYS](https://avatars.discourse-cdn.com/v4/letter/h/5f8ce5/32.png) [@HSYS](https://forum.ansible.com/u/HSYS)\
**Post date:** [August 6, 2024, 2:23pm UTC](https://forum.ansible.com/t/ansible-windows-win-updates-not-installing-every-update/7673/1 "2024-08-06T14:23:45Z")

</div>

Hello, im new to ansible.  
I’m trying to update a test environment with the following playbook:

```auto
- name: Update VMs
  hosts: VMs

  tasks:
   - name: Install Windows Updates
     ansible.windows.win_updates:
      server_selection: windows_update
      reboot: yes
      reboot_timeout: 600
      state: installed
      reject_list:
      - KB5034439
      category_names: '*'
     become: true
     become_method: runas
     become_user: SYSTEM

```

On the first run it installed some updates.  
On the second run it is not detecting any updates to install.

This is the result “-vvv” after the second run:

```auto

ok: [10.68.236.10] => {
4:22:04 PM
    "changed": false,
4:22:04 PM
    "failed_update_count": 0,
4:22:04 PM
    "filtered_updates": {
4:22:04 PM
        "a8a2d6e3-c6dc-4eb8-bcfb-8c8c7d947899": {
4:22:04 PM
            "categories": [
4:22:04 PM
                "Microsoft Server operating system-21H2",
4:22:04 PM
                "Security Updates"
4:22:04 PM
            ],
4:22:04 PM
            "downloaded": false,
4:22:04 PM
            "filtered_reason": "blacklist",
4:22:04 PM
            "filtered_reasons": [
4:22:04 PM
                "reject_list"
4:22:04 PM
            ],
4:22:04 PM
            "id": "a8a2d6e3-c6dc-4eb8-bcfb-8c8c7d947899",
4:22:04 PM
            "installed": false,
4:22:04 PM
            "kb": [
4:22:04 PM
                "5034439"
4:22:04 PM
            ],
4:22:04 PM
            "title": "2024-01 Security Update for Microsoft server operating system version 21H2 for x64-based Systems (KB5034439)"
4:22:04 PM
        }
4:22:04 PM
    },
4:22:04 PM
    "found_update_count": 0,
4:22:04 PM
    "installed_update_count": 0,
4:22:04 PM
    "invocation": {
4:22:04 PM
        "module_args": {
4:22:04 PM
            "accept_list": null,
4:22:04 PM
            "category_names": [
4:22:04 PM
                "*"
4:22:04 PM
            ],
4:22:04 PM
            "log_path": null,
4:22:04 PM
            "reboot": true,
4:22:04 PM
            "reboot_timeout": 600,
4:22:04 PM
            "reject_list": [
4:22:04 PM
                "KB5034439"
4:22:04 PM
            ],
4:22:04 PM
            "server_selection": "windows_update",
4:22:04 PM
            "skip_optional": false,
4:22:04 PM
            "state": "installed"
4:22:04 PM
        }
4:22:04 PM
    },
4:22:04 PM
    "reboot_required": false,
4:22:04 PM
    "rebooted": false,
4:22:04 PM
    "updates": {}
4:22:04 PM
}

```

But when i look at the GUI in windows, it still shows updates to be installed:

 ![image](https://us1.discourse-cdn.com/ansible/original/2X/6/65c6592339f205dd388df717b1ba5e2f6c14d9c7.png)

I use winrm to connect to the machine.

Am I missing something in my playbook? I have this issue on different VMs.

---

<div class="post-metadata">

**Author:** ![ansibliano](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@ansibliano](https://forum.ansible.com/u/ansibliano)\
**Post date:** [December 2, 2024, 2:27pm UTC](https://forum.ansible.com/t/ansible-windows-win-updates-not-installing-every-update/7673/2 "2024-12-02T14:27:44Z")

</div>

> [@HSYS](#):
>
> s issue on different

I have exaclty the same issue.  
Did you solve?

Tis is my screenshot:

 ![image](https://us1.discourse-cdn.com/ansible/original/2X/f/f75546a7a0bcc19ac19c0bec0a3547e527874645.png)

These are kb installed by ansible:

 ![image](https://us1.discourse-cdn.com/ansible/original/2X/9/913f0b6a8033ef692433c45ab4dd6f84b4ef52a3.png)

Thanks  
Mario
