This commit is contained in:
2025-08-18 13:30:13 +02:00
parent 7c227ce583
commit caa958af74

View File

@@ -1,20 +1,20 @@
---
- name: Patch Domain Controllers via SYSTEM task
hosts: DCServers
hosts: domain_controllers
gather_facts: no
tasks:
- name: Start the SYSTEM patch task
ansible.windows.win_scheduled_task:
community.windows.win_scheduled_task:
name: "Patching-windows-task"
state: started
- name: Wait for task to finish
ansible.windows.win_scheduled_task_stat:
community.windows.win_scheduled_task_stat:
name: "Patching-windows-task"
register: taskstat
until: taskstat.task.state in ['Ready','Disabled']
retries: 180 # 3 hours
retries: 180
delay: 60
- name: Reboot if required