diff --git a/patch-dc-controllers.yaml b/patch-dc-controllers.yaml index 0ee0b99..5d2083d 100644 --- a/patch-dc-controllers.yaml +++ b/patch-dc-controllers.yaml @@ -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