Hello
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:
root@cargo:/tmp#ls -l
-rw-r--r-- 1 ansible ansible 1276 Mar 15 20:29 infra_users.yml
This file is a playbook generated by a template.
does anyone have any idea what is wrong?
Thanks a lot for your help.
Karim.
Here is the task :
- name: Creates infra users
template:
src: usertpl.yml.j2
dest: /tmp/infra_users.yml
mode: '0644'
delegate_to: 'cargo'
become: no
changed_when: false
- include_tasks: /tmp/infra_users.yml