Based on feedback we have received this week we will cover Ansible and today I will show you how to install Windows Updates using Ansible for Windows.
Last month we covered Ansible for Windows in-depth using the four-part series on how to manage Windows Machine with Ansible.
Windows Updates
This post will show you a playbook that installs Windows updates on a managed Windows machines without needing to use WSUS. The playbook installs Security, Definition, critical and rollup updates and restarts the machine if needed.
Below you can see the code.
--- - name: "Windows Updates" hosts: windows tasks: - name: Install Windows updates win_updates: category_names: - SecurityUpdates - CriticalUpdates - UpdateRollups - DefinitionUpdates reboot: yes
Note: To install all the update types use the following list.
- SecurityUpdates - CriticalUpdates - UpdateRollups - DefinitionUpdates - updates - FeaturePacks - Servicepacks - Tools - Application
Processing…
Success! You're on the list.
Whoops! There was an error and we couldn't process your subscription. Please reload the page and try again.
Comments
One response to “Install Windows Updates With Ansible”
Hi,
How can I do the patch updates for Microsoft Office 2016 using ansible?
Regards,