# Ansible.cfg file's VALUES are not picking up during playbook run

**URL:** <https://forum.ansible.com/t/ansible-cfg-files-values-are-not-picking-up-during-playbook-run/3956>\
**Category:** Get Help\
**Tags:** awx, ee\
**Created:** [February 20, 2024, 4:38am UTC](https://forum.ansible.com/t/ansible-cfg-files-values-are-not-picking-up-during-playbook-run/3956 "2024-02-20T04:38:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![amvj](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/amvj/32/383_2.png) [@amvj](https://forum.ansible.com/u/amvj)\
**Post date:** [February 20, 2024, 4:38am UTC](https://forum.ansible.com/t/ansible-cfg-files-values-are-not-picking-up-during-playbook-run/3956/1 "2024-02-20T04:38:45Z")

</div>

We have added **custom roles** and **collections path** (both are mentioned below) to an **Ansible.cfg** file. We then uploaded this Ansible.cfg file in an Execution environment. We then attached the Execution environment to a template (this template is attached to a project) with and ran it in AWX.

```auto
collections_paths = ~/.ansible/collections:/usr/share/ansible/collections:./collections

roles_path = ~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:./roles

```

The problem is these values are not picked by AWX during template run.

We also tried adding these as variables and added into template, added the same Ansible.cfg file as a separate file in the playbook but still these values are not picked up.

Verbosity for the template has been set to : 2 (More Verbose)

We are using AWX in our environment.

---

<div class="post-metadata">

**Author:** ![yoonmin1030](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/yoonmin1030/32/2742_2.png) [@yoonmin1030](https://forum.ansible.com/u/yoonmin1030)\
**Post date:** [March 4, 2025, 1:57am UTC](https://forum.ansible.com/t/ansible-cfg-files-values-are-not-picking-up-during-playbook-run/3956/2 "2025-03-04T01:57:29Z")

</div>

Hello, Have you ever solved this issue? I have the same problem too. 😟

---

<div class="post-metadata">

**Author:** ![wayt](https://avatars.discourse-cdn.com/v4/letter/w/3be4f8/32.png) [@wayt](https://forum.ansible.com/u/wayt)\
**Post date:** [March 4, 2025, 3:11pm UTC](https://forum.ansible.com/t/ansible-cfg-files-values-are-not-picking-up-during-playbook-run/3956/3 "2025-03-04T15:11:58Z")

</div>

If I’m understanding this; you are trying to add `./collections` and `./roles` to the search paths for collections and roles. The other values are essentially defaults with the exception of `~` being processed to the actual users home directory.

Is it possible that you are actually naming the file `Ansible.cfg` with a capital `A`? Linux is case sensitive by default and it would fail to find the file.

The default path for roles is in the playbook directory. If you have a playbook in a directory named `playbooks/playbook.yml` as an example it will look for roles in `playbooks/roles`. Is this why you are trying to force it to a new directory?

Additionally, instead of placing collections in the _project_ I’d advocate for building an _execution environment_ containing them or leveraging the dynamic installation feature via _collections/requirements.yml_. If you are bringing them locally because of not having access to Galaxy from AWX you could vendor the collection from upstream in your git forge.
