AWX not finding ansible.cfg

Hello, the problem I’m dealing with is that when I run ansible playbooks from AWX, it doesn’t seem to be able to find my ansible.cfg file.

I’m running AWX 24.6.1 in a docker container, hosted on an Ubuntu AWS EC2.

This is what the AWX job log shows:

I’ve tried the following to get it to find it, but nothing has worked:

  • Followed this link that says:
    In order to use a custom ansible.cfg file, place it at the root of your project. Ansible Tower runs ansible-playbook from the root of the project directory, where it will then find the custom ansible.cfg file.
    It says place the ansible.cfg file at the root of your project, which I’m assuming would be this location shown for “Project Base Path” of my AWX project I’m running my template from (/var/lib/awx/projects/).
  • Created ANSIBLE_CONFIG environment variable in the AWX container, per these instructions, and made it’s value “/var/lib/awx/projects/.
  • Put the ansible.cfg file in the home directory, these instructions.
  • Put the ansible.cfg file in /usr/local/bin/, where ansible-playbook is

I dunno about what you’ve got written there. For me, creating a file named ansible.cfg inside my GitHub repository seems to work in my AWX environment.

yeah, ok that worked. I was placing it in the projects directory, but needed to put it inside the actual project that houses my playbooks. Thank you!