# External files with custom inventory

**URL:** <https://forum.ansible.com/t/external-files-with-custom-inventory/27088>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [March 23, 2018, 3:55am UTC](https://forum.ansible.com/t/external-files-with-custom-inventory/27088 "2018-03-23T03:55:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MarcG](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@MarcG](https://forum.ansible.com/u/MarcG)\
**Post date:** [March 23, 2018, 3:55am UTC](https://forum.ansible.com/t/external-files-with-custom-inventory/27088/1 "2018-03-23T03:55:35Z")

</div>

Hi I have a dynamic inventory file references an external file. This external file is updated by plays under certain conditions and then effects the output of the dynamic inventory on its next run.

Is there a way to use this file with my custom inventory script in AWX?

Many thanks

---

<div class="post-metadata">

**Author:** ![matburt](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/matburt/32/3612_2.png) [@matburt](https://forum.ansible.com/u/matburt)\
**Post date:** [March 24, 2018, 9:03pm UTC](https://forum.ansible.com/t/external-files-with-custom-inventory/27088/2 "2018-03-24T21:03:01Z")

</div>

Sure… you’ll just need to be careful about where and how this file is referenced during the playbook run and when AWX runs the inventory script.

---

<div class="post-metadata">

**Author:** ![MarcG](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@MarcG](https://forum.ansible.com/u/MarcG)\
**Post date:** [March 25, 2018, 6:17am UTC](https://forum.ansible.com/t/external-files-with-custom-inventory/27088/3 "2018-03-25T06:17:11Z")

</div>

Thanks Matthew.

I didn’t word my question very well. I guess what I was wondering was there a way to have AWX automatically detect the configuration/ini file. For example if the custom script was pulled down from a SCM AWX could detect any other files in the Repo with certain extensions ( as an example ) and pull them down to the same temp folder as the custom script.

---

<div class="post-metadata">

**Author:** ![matburt](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/matburt/32/3612_2.png) [@matburt](https://forum.ansible.com/u/matburt)\
**Post date:** [March 26, 2018, 1:02am UTC](https://forum.ansible.com/t/external-files-with-custom-inventory/27088/4 "2018-03-26T01:02:17Z")

</div>

AWX itself doesn’t know anything about your custom inventory script so any logic that it needs will need to be handled from within that script itself.
