This isn’t a bug in Ansible; the log shows that inputs are missing:
azdoAgentHome() azdoAgentPool()
Both are empty, which causes the Azure DevOps agent config to fail. Quick checks:
even in ENVIRONMENT mode, define azdoAgentPool
Before setting up, make sure azdoAgentHome exists.
make sure azdoOrgURL is complete
run the task as an administrator on Windows
The cmd.exe /c type failure just means that the config script stopped running before it was supposed to. This is usually caused by missing variables or bad input, not a problem with the platform.
I’ve seen this error before. It looks like the AzDO agent config task is running but failing due to some weird characters in the log file path. Try removing the quotes around the log file path in your ansible template. That usually fixes the issue.