# Inheriting static group\_var data with dynamic inventory?

**URL:** <https://forum.ansible.com/t/inheriting-static-group-var-data-with-dynamic-inventory/20143>\
**Category:** Ansible Project\
**Created:** [January 7, 2016, 7:33pm UTC](https://forum.ansible.com/t/inheriting-static-group-var-data-with-dynamic-inventory/20143 "2016-01-07T19:33:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adam\_Kosmin](https://avatars.discourse-cdn.com/v4/letter/a/dc4da7/32.png) [@Adam\_Kosmin](https://forum.ansible.com/u/Adam_Kosmin)\
**Post date:** [January 7, 2016, 7:33pm UTC](https://forum.ansible.com/t/inheriting-static-group-var-data-with-dynamic-inventory/20143/1 "2016-01-07T19:33:04Z")

</div>

Greets,

Assuming I’ve got the following defined in group\_vars:foo.yml

---

<div class="post-metadata">

**Author:** ![Adam\_Kosmin](https://avatars.discourse-cdn.com/v4/letter/a/dc4da7/32.png) [@Adam\_Kosmin](https://forum.ansible.com/u/Adam_Kosmin)\
**Post date:** [January 7, 2016, 7:34pm UTC](https://forum.ansible.com/t/inheriting-static-group-var-data-with-dynamic-inventory/20143/2 "2016-01-07T19:34:08Z")

</div>

Sorry, meant to say bar: baz is defined in group\_vars/foo.yml

---

<div class="post-metadata">

**Author:** ![Josh\_Smift1](https://avatars.discourse-cdn.com/v4/letter/j/bcef8e/32.png) [@Josh\_Smift1](https://forum.ansible.com/u/Josh_Smift1)\
**Post date:** [January 7, 2016, 7:49pm UTC](https://forum.ansible.com/t/inheriting-static-group-var-data-with-dynamic-inventory/20143/3 "2016-01-07T19:49:58Z")

</div>

AQ ([https://github.com/caredotcom/ansible-quartermaster](https://github.com/caredotcom/ansible-quartermaster)) might be of interest.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-Josh (jbs@care.com)

This email is intended for the person(s) to whom it is addressed and may contain information that is PRIVILEGED or CONFIDENTIAL. Any unauthorized use, distribution, copying, or disclosure by any person other than the addressee(s) is strictly prohibited. If you have received this email in error, please notify the sender immediately by return email and delete the message and any attachments from your system.

---

<div class="post-metadata">

**Author:** ![Adam\_Kosmin](https://avatars.discourse-cdn.com/v4/letter/a/dc4da7/32.png) [@Adam\_Kosmin](https://forum.ansible.com/u/Adam_Kosmin)\
**Post date:** [January 8, 2016, 7:13pm UTC](https://forum.ansible.com/t/inheriting-static-group-var-data-with-dynamic-inventory/20143/4 "2016-01-08T19:13:12Z")

</div>

Josh,

Thanks for the link but that’s not going to be a good fit. I’m trying to use the add\_host module to dynamically alter group memberships of tagged instances in AWS. It would be great if anyone could provide an example of how this might be done? I know the currently accepted approach is to manually maintain these group relationships in static inventory files as per [http://docs.ansible.com/ansible/intro\_dynamic\_inventory.html#static-groups-of-dynamic-groups](http://docs.ansible.com/ansible/intro_dynamic_inventory.html#static-groups-of-dynamic-groups) but that makes me depressed.

Best,  
Adam
