Make manual projects under /var/lib/awx/projects to create a file using ansible playbook

I am using NFS and permission is 777 only. I am getting /var/lib/awx getting permission error while writing the data through playbook in to my manual projects. Login to pod and able to create a folder and file manually. But writing content into manual projects folder by using playbook only getting error. I have faced the same issue in awx 13.0 version as well. But I modified the job settings (Enable job isolation off). It worked for me. But 23.6.0 Unable to find this settings . Could you please help me to fix this issue. Thanks

Code:

  • name: Run the playbook in new dr environment
    hosts: localhost
    connection: local
    tasks:
    • name: display the messages
      debug:
      msg: "Welcome to AWX DR "
    • name: Write the content into file
      lineinfile:
      path: /var/lib/awx/projects/testing/testfile.txt
      line: “Welcome to DR”
      create: yes

Error Message

TASK [Write the content into file] *********************************************
fatal: [localhost]: FAILED! => {“changed”: false, “msg”: “Error creating /var/lib/awx/projects/testing ([Errno 13] Permission denied: b’/var/lib/awx/projects/testing’)”}

With Regards,
Veera

Hello!
I’m glad you asked that question, when you run a playbook from AWX, the playbook runs in an “execution environment” which is a docker/podman type container. In the task where you try to modify the path, you are trying to modify it from the container itself, not from AWX itself, that is, you are running it in the container under the default user (if you haven’t changed it) that runs the container. If you want to change the layout and put “Welcome to DR” you will have to do it in the instance (either a cluster, container, or server) where you are running the AWX, and do it from terminal better.