I am desperately trying to run a command on the ansible controller.
Since I’m using AWX 20 I use “delegate_to: cargo” cargo is the host (k3s) on which AWX is running. I read on this group that “delegate_to:localhost” wouldn’t work.
everything works on my computer with Ansible 2.9 but not with AWX which returns this error:
{“reason”: “Could not find or access ‘/tmp/infra_users.yml’ on the Ansible Controller.”}
if I check on the host, the file /tmp/infra_users.yml does exist though:
Thanks for mentioning, glad you could solve your issue.
I was not aware there was a problem with ‘delegate_to: localhost’ as you had mentioned: we are using it successfully in our playbooks with AWX here.
yes I have read some answers to that effect but I think it was just a path issue. If i remember, it said to add the AWX host to the inventory and to switch to delegate_to: awx_host
for my part I was using /tmp but replacing it with the project directory and again specifying delegate_to: localhost it works fine
I was also surprised because I was using it without problems on an old AWX platform.
Thanks for the additional explanations. It might have been that /tmp was too volatile in a container environment, compared to the project directory.
Interesting to see also it was working in a previous version, it might have been undocumented.