# Should I mix static and dynamic inventories (i.e. inventory dir)?

**URL:** <https://forum.ansible.com/t/should-i-mix-static-and-dynamic-inventories-i-e-inventory-dir/15389>\
**Category:** Ansible Project\
**Created:** [June 2, 2014, 4:06pm UTC](https://forum.ansible.com/t/should-i-mix-static-and-dynamic-inventories-i-e-inventory-dir/15389 "2014-06-02T16:06:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hagai\_Kariti](https://avatars.discourse-cdn.com/v4/letter/h/4491bb/32.png) [@Hagai\_Kariti](https://forum.ansible.com/u/Hagai_Kariti)\
**Post date:** [June 2, 2014, 4:06pm UTC](https://forum.ansible.com/t/should-i-mix-static-and-dynamic-inventories-i-e-inventory-dir/15389/1 "2014-06-02T16:06:29Z")

</div>

Hi all.

We’re using a mix of dynamic and static inventories: the dynamic one for updated host and hostgroups and the static one for group relations and the occasional static host.  
Is this the “proper” way to handle this usecase? Is there a better way that doesn’t require a static inventory file? And maybe more importantly, is the inventory dir feature going to stay in Ansible?

Thanks a lot.

---

<div class="post-metadata">

**Author:** ![James\_Cammarata](https://avatars.discourse-cdn.com/v4/letter/j/7c8e57/32.png) [@James\_Cammarata](https://forum.ansible.com/u/James_Cammarata)\
**Post date:** [June 3, 2014, 3:29am UTC](https://forum.ansible.com/t/should-i-mix-static-and-dynamic-inventories-i-e-inventory-dir/15389/2 "2014-06-03T03:29:57Z")

</div>

Yes, we have no intention of ever removing that feature, and this is a fairly normal use-case. The only other option would be to somehow fold the “static” information into your dynamic script somehow, but if you can’t do that then there’s nothing wrong with the way you’re doing it.

---

<div class="post-metadata">

**Author:** ![Hagai\_Kariti](https://avatars.discourse-cdn.com/v4/letter/h/4491bb/32.png) [@Hagai\_Kariti](https://forum.ansible.com/u/Hagai_Kariti)\
**Post date:** [June 3, 2014, 5:23am UTC](https://forum.ansible.com/t/should-i-mix-static-and-dynamic-inventories-i-e-inventory-dir/15389/3 "2014-06-03T05:23:49Z")

</div>

Thanks!
