add rescue for DC02 promotion

This commit is contained in:
abrown38 committed 2024-04-22 10:20:39 +00:00
1 parent fdbe685175
commit a02177f762
1 file changed
+15
@@ -75,6 +75,21 @@
state: domain_controller
register: dc02_promotion
rescue:
- name: Wait 2 minuets before trying to promote again
pause:
minuets: 2
- name: Promote DC02 to domain controller
win_domain_controller:
dns_domain_name: "{{ win_project }}.loc"
domain_admin_user: "Administrator@{{ win_project }}.loc"
domain_admin_password: "{{ ansible_password }}"
safe_mode_password: "{{ safemode_password }}"
state: domain_controller
register: dc02_promotion
always:
- name: Rebooting DC02 post promotion to domain controller
win_reboot:
reboot_timeout_sec: 1200