Ansible.builtin.copy is not working with AWX 23.8.2

Hi Team. I’m using AWX 23.8.2 (docker installation: awx/tools/docker-compose/ at devel · ansible/awx · GitHub). Im trying to create a local file and save it in AWX instance, and I can not find the way to do this. This is the playbook.

  • name: IOS CONFIG
    - show run
    register: output

    content: “{{ output.stdout[0] }}”
    dest: “/etc/ansible/backups/repo_cisco_asa_backup/show_run_{{ inventory_hostname }}.txt”

The playbook using AWX seems to work fine, but I can not find the output file. This task works fine using AWX 17.0.

Do you know where (path location) this AWX version store this file? Can I do this with this new version?

thanks in advance.

In the newer version of AWX (I don’t recall when we started)

Job runs in a “execution environment” container within the tools_awx_ container

The execution container does not share the tools_awx_ container’s file-system and everything that’s needed to execute the job is streamed into the container

The playbook that you show will create the file in the execution container which will not be persisted on the tools_awx_ container (or your host machine)

try this setting out

(disclaimer: personally haven’t try it out)

also IMPORTANT NOTE: the /etc/ansible/backups that you are writing to within tools_awx_<x> container is not persisted on your host in anyway so if the container restart you will lose the data

in the docker-compose file you might want to add an extra volume to persist this data (if you want the data to be persisted)