Playbook - Update Windows Machine (Windows Update Disabled)
This playbook will:
- Modify windows update service to manual in case the machine is set to disabled
- Start the windows update service
- Download and install the updates, reboot if required
The playbook is as follows, please change the encapsulated < >
values to the desired values:
---
- hosts: <inventory group / hosts>
tasks:
- name: change windows update service to manual
win_shell: Set-Service wuauserv -StartupType Manual
- name: start windows update service
win_shell: Start-Service wuauserv
- name: download and install updates
win_updates:
reboot: yes
No Comments