# dynamic inventory with multiply files

**URL:** <https://forum.ansible.com/t/dynamic-inventory-with-multiply-files/31509>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [October 22, 2019, 2:58pm UTC](https://forum.ansible.com/t/dynamic-inventory-with-multiply-files/31509 "2019-10-22T14:58:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Misha\_Volodko](https://avatars.discourse-cdn.com/v4/letter/m/919ad9/32.png) [@Misha\_Volodko](https://forum.ansible.com/u/Misha_Volodko)\
**Post date:** [October 22, 2019, 2:58pm UTC](https://forum.ansible.com/t/dynamic-inventory-with-multiply-files/31509/1 "2019-10-22T14:58:03Z")

</div>

Having hard time trying to add my dynamic inventory to tower - under inventory scripts is allows only to paste content of single file. What is I have git project for inventory which consist of multiply files?

I’m querying CMDB via API and don’t want to have token for auth be part of code which is pushed to git as well.  
Found project are stored in /var/lib/awx/projects, is there a place where dynamic inventories are stored?

---

<div class="post-metadata">

**Author:** ![AlanCoding](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/alancoding/32/301_2.png) [@AlanCoding](https://forum.ansible.com/u/AlanCoding)\
**Post date:** [October 22, 2019, 3:15pm UTC](https://forum.ansible.com/t/dynamic-inventory-with-multiply-files/31509/2 "2019-10-22T15:15:09Z")

</div>

Very much agree that you should not check your tokens into source control.

Over time, our #1 recommended practice for this has converged on this:

- Create a project with aforementioned source control
- Create a credential type which defines your auth token and its use
- Create a credential with your own personal token
- Create an inventory source, source from project
- Associate that credential with the inventory source
- Update the inventory source

This way, the passwords are saved in the database with the standard AWX encryption method.

For multiple files, it depends. The relative path you give for the inventory can be a directory. That assumes you want to use ALL files in the directory as inventory files. Otherwise you can create multiple sources.

---

<div class="post-metadata">

**Author:** ![Misha\_Volodko](https://avatars.discourse-cdn.com/v4/letter/m/919ad9/32.png) [@Misha\_Volodko](https://forum.ansible.com/u/Misha_Volodko)\
**Post date:** [October 24, 2019, 7:54am UTC](https://forum.ansible.com/t/dynamic-inventory-with-multiply-files/31509/3 "2019-10-24T07:54:59Z")

</div>

Thank you.

This is really helpful.
