Right now I’m working on a project to join a Windows server to the domain, the process works but currently I’m waiting for the winrm service using win_wait_for. Is there a more dynamic way to do this? Generic example below of the wait.
- name: Wait for winrm to come back online after reboot
win_wait_for:
port: “{{ ansible_winrm_port }}”
delay: 60
when: dc1.reboot_required
Any help is greatly appreciated as I have wait timers in a lot of places and it feels like an area to make the code more efficient.