Playbook - Update Windows Machine (Windows Update Disabled)

This playbook will:

  1. Modify windows update service to manual in case the machine is set to disabled
  2. Start the windows update service
  3. 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