Workflow to setup Windows Domain with DC and hosts (#168)
Co-authored-by: willtome <wtome@redhat.com> Co-authored-by: Chris Edillon <67980205+jce-redhat@users.noreply.github.com>
This commit is contained in:
37
windows/tasks/domain_services_check.yml
Normal file
37
windows/tasks/domain_services_check.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
- name: Initial services check
|
||||
block:
|
||||
- name: Initial reboot
|
||||
ansible.windows.win_reboot:
|
||||
reboot_timeout: 3600
|
||||
|
||||
- name: Wait for AD services
|
||||
community.windows.win_wait_for_process:
|
||||
process_name_exact: Microsoft.ActiveDirectory.WebServices
|
||||
pre_wait_delay: 60
|
||||
state: present
|
||||
timeout: 600
|
||||
sleep: 10
|
||||
rescue:
|
||||
- name: Note initial failure
|
||||
ansible.builtin.debug:
|
||||
msg: "Initial services check failed, rebooting again..."
|
||||
|
||||
- name: Secondary services check
|
||||
block:
|
||||
- name: Reboot again
|
||||
ansible.windows.win_reboot:
|
||||
reboot_timeout: 3600
|
||||
|
||||
- name: Wait for AD services again
|
||||
community.windows.win_wait_for_process:
|
||||
process_name_exact: Microsoft.ActiveDirectory.WebServices
|
||||
pre_wait_delay: 60
|
||||
state: present
|
||||
timeout: 600
|
||||
sleep: 10
|
||||
rescue:
|
||||
- name: Note secondary failure
|
||||
failed_when: true
|
||||
ansible.builtin.debug:
|
||||
msg: "Secondary services check failed, bailing out..."
|
||||
Reference in New Issue
Block a user