# where to manage common inventory properties

**URL:** <https://forum.ansible.com/t/where-to-manage-common-inventory-properties/16772>\
**Category:** Ansible Project\
**Created:** [November 13, 2014, 12:52pm UTC](https://forum.ansible.com/t/where-to-manage-common-inventory-properties/16772 "2014-11-13T12:52:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Torsten\_Reinhard](https://avatars.discourse-cdn.com/v4/letter/t/46a35a/32.png) [@Torsten\_Reinhard](https://forum.ansible.com/u/Torsten_Reinhard)\
**Post date:** [November 13, 2014, 12:52pm UTC](https://forum.ansible.com/t/where-to-manage-common-inventory-properties/16772/1 "2014-11-13T12:52:47Z")

</div>

Hi all,

we started to create our inventory and in the beginning we were just fine with the host\_vars and group\_vars option to place our properties.  
Now, for some configuration we have almost the same settings on DEV, TEST and PROD environment and I´m think about where to put them.

Of course, I can put the common properties to roles/…/vars or directly into the playbook

- but than it ends up with a “configuration management” based on inventory and vars files in the playbooks, roles or whereever.

I know about the group\_vars/all option - but this is only for one environment - not for many like

`  
inventory/trunk/

- dev1  
hosts
- …
- dev3
- test1
- …
- prod  
`hosts`

`

What is best practice to manage such “common inventory properties” - and to dont end up with some properties here, others there in the filesystem ?

Is the only way a dynamic inventory that will than solve this problem in its implementation?

Thanx, Torsten

---

<div class="post-metadata">

**Author:** ![Tomasz\_Kontusz](https://avatars.discourse-cdn.com/v4/letter/t/bc79bd/32.png) [@Tomasz\_Kontusz](https://forum.ansible.com/u/Tomasz_Kontusz)\
**Post date:** [November 14, 2014, 9:18am UTC](https://forum.ansible.com/t/where-to-manage-common-inventory-properties/16772/2 "2014-11-14T09:18:06Z")

</div>

You can get common group\_vars, by either using directory per group + symlinks, or putting group\_vars next to playbook (they would be loaded in addition to those next to inventory).

The second one used to have problems with vars for the same group defined in both places, but you can work around this by making separate \*\_common groups.

Torsten Reinhard [info@torstenreinhard.de](mailto:info@torstenreinhard.de) napisał:

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [November 17, 2014, 9:07pm UTC](https://forum.ansible.com/t/where-to-manage-common-inventory-properties/16772/3 "2014-11-17T21:07:35Z")

</div>

I like using group\_vars and host\_vars for these things, though it should be noted it’s a good idea to keep your production and dev inventory in different files, to avoid the chance of doing “-i inventory.ini” against the all group and managing them simultaneously.
