Heyall!
Im having some difficulty understanding a particular playbook that we are working on.
Simple scenario, we want to edit a file that is running on AWX itself, which is running on k3s. The playbook uses lineinfile module and we want to edit a particular file on the host itself located in /projects.
Playbook executes fine and says that line has been added however what we have noticed is that it looks like the VM is running on the EE pod which is created when using the execution environment. Case in point when we added the the backupflag in the playbook, during execution we have managed to see the backupfile created on the overlay volume. Then container is automatically removed and file is gone.
[root@infraawx WIN_Cluster]# locate WIN_Cluster.csv. /var/lib/rancher/k3s/agent/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/541/fs/runner/project/WIN_Cluster/WIN_Cluster.csv.59.2022-05-18@10:54:28~
Playbook is
- name: Adding initial line to spreadsheet
ansible.builtin.lineinfile:
remote_user: root
path: '/projects/vmware/{{ cluster_name | replace(" ",replacer) + "/" + cluster_name | replace(" ",replacer)}}.csv'
line: "Testing123"
insertafter: EOF
backup: yes
create: yes
state: present
register: testout
delegate_to: localhost
Any clues what might be happening?
Thank you!