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

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.

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.

Thanks!