ansible playbook is not working on the target host but shows ok

49 views
Skip to first unread message

Emerson Natividad

unread,
Nov 16, 2022, 9:53:19 AM11/16/22
to Ansible Project
Hello, I don't understand why in ansible its showing ok, but in host machine the updates still not installed and why it's Skipping update. TIA

Here's my playbook:
---
- name: Windows Update
  hosts: desktop
  tasks:
    - name: Install all updates and reboot as many times as needed
      win_updates:
        category_name:
        - SecurityUpdates
        - CriticalUpdates
        - UpdateRollups
        - Upgrades
       whitelist:
       - KB5001716
        state: installed
        reboot: yes

Here's the logs result:

2022-11-16 17:40:56Z WUA is available in current logon process, running natively
2022-11-16 17:40:56Z Creating Windows Update session...
2022-11-16 17:40:57Z Create Windows Update searcher...
2022-11-16 17:40:57Z Setting the Windows Update Agent source catalog...
2022-11-16 17:40:57Z Requested search source is 'default'
2022-11-16 17:40:57Z Search source set to 'default' (ServerSelection = 0)
2022-11-16 17:40:57Z Searching for updates to install
2022-11-16 17:41:04Z Found 2 updates
2022-11-16 17:41:04Z Creating update collection...
2022-11-16 17:41:04Z Skipping update ce651da3-8feb-4c0a-bddc-d720b2cdc1da - 2022-11 Update for Windows 10 Version 20H2 for x64-based Systems (KB5001716) as it was not found in the category names filter
2022-11-16 17:41:04Z Skipping update 2314f880-3a62-4a87-856b-55e2e980ceda - Feature update to Windows 10, version 21H2 as it was not found in the category names filter
2022-11-16 17:41:04Z Calculating pre-install reboot requirement...
2022-11-16 17:41:04Z Native job completed with output:
Name                           Value                                                                                                                                                                                                                                                                        
----                           -----                                                                                                                                                                                                                                                                        
updates                        {}                                                                                                                                                                                                                                                                          
found_update_count             0                                                                                                                                                                                                                                                                            
changed                        False                                                                                                                                                                                                                                                                        
reboot_required                False                                                                                                                                                                                                                                                                        
installed_update_count         0                                                                                                                                                                                                                                                                            
filtered_updates               {ce651da3-8feb-4c0a-bddc-d720b2cdc1da, 2314f880-3a62-4a87-856b-55e2e980ceda}          
Reply all
Reply to author
Forward
0 new messages