Hello, I am trying to install windows updates with Ansible and for some reason it is not working. This is what I have so far.
My PlayBook
This is the results after the play runs:
Then when I go to the windows 10 machine this is what I see when i look at the updates:
I am not sure if I maybe am not covering the correct category or what. I have also tried to upgrade a 1803 windows 10 to 1909 with no avail. Can anyone help me with getting ansible to be able to update windows.
The account I am using is a admin on the windows 10 machine. I also have another play book that uses the win_chocolatey module to install Apps and it installs them fine. So, I don’t think this can be a permission issue.
Hi Alan,
Extend the list of “category_names” to include more or less all and any possible category.
What happens when you run the playbook, is that it only lists and installs the ones that you states in the “category_names”, whereas the Windows Update in your clients will search for all and anything it can. Hence, you might not have installed all updates that are available.
For example, for our Windows 2016 servers, we use the list:
category_names:
-
Application
-
Connectors
-
CriticalUpdates
-
DefinitionUpdates
-
DeveloperKits
-
FeaturePacks
-
Guidance
-
SecurityUpdates
-
ServicePacks
-
Tools
-
UpdateRollups
-
Updates
I wish you a nice day!
//magnus
(attachments)
Hello Magnus,
I added all the categories you have that I did not have. This is now my playbook:
`
My end goal it actually not to install all teh windows updates. I am just wanting to upgrade windows 10 boxes to 1909 and the 2004 updates. I am trying to get a group of Windows 10 PC of 5-10 and run a upgrade playbook and install the 1909 and the 2004 update after hours when the users are not at there PCs.
So here is an issue I am having I am trying to get the Feature update to windows 10 version 1909 installed using Ansible. When I go to Update & Security this is what I see:
Then I run this playbook to install that update, and this is the outcome.
Playbook:
`
Oh, that is a whole different thing. I have never tried that.
I assume you might have to find a clever powershell one-liner to detect it, and another one to trigger the installation.
//magnus
(attachments)