Skip to main content

Playbook to 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
---
- hosts: lab_computers
  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