# AWX not finding ansible.cfg

**URL:** <https://forum.ansible.com/t/awx-not-finding-ansible-cfg/39932>\
**Category:** Get Help\
**Tags:** ubuntu, awx, aws\
**Created:** [January 30, 2025, 6:08pm UTC](https://forum.ansible.com/t/awx-not-finding-ansible-cfg/39932 "2025-01-30T18:08:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![brunojohn23](https://avatars.discourse-cdn.com/v4/letter/b/9fc29f/32.png) [@brunojohn23](https://forum.ansible.com/u/brunojohn23)\
**Post date:** [January 30, 2025, 6:08pm UTC](https://forum.ansible.com/t/awx-not-finding-ansible-cfg/39932/1 "2025-01-30T18:08:15Z")

</div>

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:

 ![AWXConfigOutput](https://us1.discourse-cdn.com/ansible/original/2X/4/476817732210ae81a2cf85005b0997fb81833d86.png)

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

- Followed this [link](https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.ansible.com%2Fansible-tower%2Flatest%2Fhtml%2Fadministration%2Ftipsandtricks.html%23locate-and-configure-the-ansible-configuration-file&data=05%7C02%7Cjohn.bruno%40worldpay.com%7C1071034089ec4bfd894208dd411ebe5e%7Ce3ff91d834c84b15a0b418910a6ac575%7C0%7C0%7C638738322540024572%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=7I9eWuOhHiAzp101%2B6%2BO7Mbhp33wV5O28qSTA8vait4%3D&reserved=0) 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](https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.ansible.com%2Fansible%2Flatest%2Freference_appendices%2Fconfig.html%23ansible-configuration-settings-locations&data=05%7C02%7Cjohn.bruno%40worldpay.com%7C1071034089ec4bfd894208dd411ebe5e%7Ce3ff91d834c84b15a0b418910a6ac575%7C0%7C0%7C638738322540038685%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=59E3WGgTEwbeHXOFQ5v2L1FvD8ttadW%2BWf9SQynklIo%3D&reserved=0), and made it’s value “/var/lib/awx/projects/.
- Put the ansible.cfg file in the home directory, [these instructions](https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.ansible.com%2Fansible%2Flatest%2Freference_appendices%2Fconfig.html%23ansible-configuration-settings-locations&data=05%7C02%7Cjohn.bruno%40worldpay.com%7C1071034089ec4bfd894208dd411ebe5e%7Ce3ff91d834c84b15a0b418910a6ac575%7C0%7C0%7C638738322540052907%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=iJPCgaKcpbhwWMdQjrax7NEewFzdJln16pi9XGfEnkk%3D&reserved=0).
- Put the ansible.cfg file in /usr/local/bin/, where ansible-playbook is

---

<div class="post-metadata">

**Author:** ![anon81884396](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@anon81884396](https://forum.ansible.com/u/anon81884396)\
**Post date:** [January 30, 2025, 10:53pm UTC](https://forum.ansible.com/t/awx-not-finding-ansible-cfg/39932/2 "2025-01-30T22:53:42Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![brunojohn23](https://avatars.discourse-cdn.com/v4/letter/b/9fc29f/32.png) [@brunojohn23](https://forum.ansible.com/u/brunojohn23)\
**Post date:** [January 30, 2025, 11:43pm UTC](https://forum.ansible.com/t/awx-not-finding-ansible-cfg/39932/3 "2025-01-30T23:43:31Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [March 1, 2025, 11:43pm UTC](https://forum.ansible.com/t/awx-not-finding-ansible-cfg/39932/4 "2025-03-01T23:43:42Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
