In v2.4.x.x how can I include host groups in one inventory file to another? If so how?

Say I have inventory files that look like this

`
host_vars/bitbucket_servers

Why not just create one inventory like below?

/inventory/hosts.inv
`
[bb-gerrit-cluster:children]
bb-cluster1
gerrit-cluster1

[bb-cluster1]
www.bb-loc1.domain.com
www.bb-loc2.domain.com

[gerritt-cluster1]
www.gerritt-loc1.domain.com
www.gerritt-loc2.comain.com

[jira-cluster1]
www.jira-loc1.domain.com
www.jira-loc2.comain.com
`

And then create your folder structure like:

inventory/
inventory/hosts.inv
inventory/group_vars/
inventory/group_vars/bb-cluster1
inventory/group_vars/gerritt-cluster1
inventory/group_vars/jira-cluster1
inventory/host_vars
inventory/host_vars/xxxxxxxx

Not sure if this would meet your requirements but this would be much cleaner IMHO. But maybe not? As I am not sure what your requirements are.

Definitely a single inventory file is NOT what I want/need, but thanks.

Cool. No worries. However, I would be interested in hearing your use case. Always interesting to hear others perspective on how to use inventory, group vars, and host vars.

In my case, I have different servers represented in their respective inventory files - bitbucket, gerrit, atlassian, etc. I need to set up group variables that are common to some, but NOT all.