Ansible/yml/Windows-Updates-Install.yml
2023-07-03 20:39:45 +02:00

32 lines
827 B
YAML

---
- name: Installation mises a jours Windows
hosts: windows
gather_facts: no
become: false
tasks:
- name: "Installation mises a jours Windows"
win_updates:
category_names:
- Application
- Connectors
- CriticalUpdates
- DefinitionUpdates
- SecurityUpdates
- Tools
- UpdateRollups
- Updates
state: "installed"
log_path: "C:\Ansible_WU.txt"
- name: Ensure WinRM starts when the system has settled and is ready to work reliably
win_service:
name: WinRM
start_mode: delayed
# Optionally, you can increase the reboot_timeout to survive long updates during reboot
- name: Ensure we wait long enough for the updates to be applied during reboot
win_updates:
reboot: no
reboot_timeout: 3600
...