2
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user