Unable to install Windows Updates using Ansible 'win_update' Module

257 views
Skip to first unread message

Dinesh Vashisht

unread,
May 10, 2018, 4:46:16 AM5/10/18
to Ansible Project
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

Jordan Borean

unread,
May 14, 2018, 12:14:02 AM5/14/18
to Ansible Project
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 and I will get round to testing it sometime soon.

Thanks

Jordan

Jordan Borean

unread,
May 16, 2018, 4:54:53 PM5/16/18
to Ansible Project
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.

Thanks

Jordan

Dinesh Vashisht

unread,
Jun 28, 2018, 9:31:03 AM6/28/18
to Ansible Project
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
Reply all
Reply to author
Forward
0 new messages