I am using AWX tower to run Ansible playbooks to create Azure VM. Everything works fine up to April 2024 but last 2 months pipeline failed to create VM with domain join. As searched in logs “win_domain_membership” module not working as expected.
Below is the code and logs of playbook #Join server in domain
name: Reboot server
win_reboot:
when: Domain == “YES”
ESTABLISH WINRM CONNECTION FOR USER: Adminuser on PORT 5985 TO
ESTABLISH WINRM CONNECTION FOR USER: Adminuser on PORT 5985 TO
fatal: [Temp_Host]: FAILED! => {
“changed”: false,
“elapsed”: 605,
“msg”: “Timed out waiting for last boot time check (timeout=600)”,
“rebooted”: true
}
Ansible 2.9 is End of Life and hasn’t received any updates for over two years. Have you tried this with a newer version of Ansible, and/or a newer version of the ansible.windows collection (of which win_domain_membership is a part since 2.10)?
Hi @felixfontein
Thanks for sharing details but my project using Ansible 2.9 only, we have to fix this issue. Shall I use “microsoft.ad.membership” module instead of old module “win_domain_membership”.
Maybe just using the new win_domain_membership from ansible.windows instead of the built-in module in 2.9 will already help. On the other hand, latest ansible.windows no longer supports 2.9 (it requires ansible-core 2.15+), so maybe it won’t work. Maybe microsoft.ad.membership also works; I’ve never used any of these modules (since I don’t work with Windows).
None of the Windows collections were certified with 2.9 so your mileage may vary. Unfortunately as felix has mentioned 2.9 is EOL so even if this was a bug we wouldn’t be fixing it.
You should look at the hosts to see if they are coming back online or whether the reboot is just now taking longer to run. If so you can increase the timeout to wait.
Hello @felixfontein@jborean
Thank you for sharing details on modules and collections. However, we are struck with Ansible 2.9 and need to fix this module issue. After changing module “win_domain_membership” to “microsoft.ad.membership” I got below error ERROR! couldn’t resolve module/action ‘microsoft.ad.membership’. This often indicates a misspelling, missing collection, or incorrect module path.
‘microsoft.ad.membership’ module default module in Ansible 2.9 or not. If need to download means what is the command to install it.