Below is my script for windows automation, script runs successfully but i can still windows updates in the windows updates section of windows server 2016 screenshot attached
Please help. Sorry for posting in between a random topic as i am lost and i dont know where to get the help from. Any saviours around? If this is the wrong forum please direct me to get the technical help then.
Sorry again.
---
- name: Windows Update
hosts: winhost
gather_facts: false
tasks:
- name: Running Windows Update
win_updates:
category_names: ['Security Updates','Critical Updates','Update Rollups', 'Update', 'Definition Updates', 'Upgrades', 'Tools', 'Guidance', 'ServicePacks', 'FeaturePacks', 'Application', 'Connectors', 'Developer Kits', 'Drivers', 'Monthly Rollup', 'Full Updates', 'Express Updates', 'Delta Updates', 'Security-only Update', 'SecurityMonthlyQualityRollup','Security Intelligence Update']
register: result
# output results
- debug: var=result
# reboot only if required
- win_reboot:
when: result.reboot_required