# Merging global group\_vars

**URL:** <https://forum.ansible.com/t/merging-global-group-vars/26876>\
**Category:** Ansible Project\
**Created:** [March 1, 2018, 11:13am UTC](https://forum.ansible.com/t/merging-global-group-vars/26876 "2018-03-01T11:13:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mario](https://avatars.discourse-cdn.com/v4/letter/m/8e7dd6/32.png) [@Mario](https://forum.ansible.com/u/Mario)\
**Post date:** [March 1, 2018, 11:13am UTC](https://forum.ansible.com/t/merging-global-group-vars/26876/1 "2018-03-01T11:13:58Z")

</div>

How can I merge global in-memory group\_vars with some other yml files?

We will have a best practice approch with a couple of groups and some corresponding roles.  
The folder structure will have a top-level group\_vars and host\_vars folder. They get polulated through a custom inventory module that reads data from an external api.  
We would like to then to merge the group\_vars with local custom\_vars. The merged values should be again in the global in-memory inventory.  
Is there any existing module for that?

cheers  
mario
