# how to override entry in a dictionary

**URL:** <https://forum.ansible.com/t/how-to-override-entry-in-a-dictionary/24721>\
**Category:** Ansible Project\
**Created:** [June 14, 2017, 9:50am UTC](https://forum.ansible.com/t/how-to-override-entry-in-a-dictionary/24721 "2017-06-14T09:50:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ansible\_Madness](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Ansible\_Madness](https://forum.ansible.com/u/Ansible_Madness)\
**Post date:** [June 14, 2017, 9:50am UTC](https://forum.ansible.com/t/how-to-override-entry-in-a-dictionary/24721/1 "2017-06-14T09:50:44Z")

</div>

hi

assuming a have some dictionary variables defined in some group\_vars location:

level0:  
level1-a:

somevalue: aaa  
someothervalue: 111

level1-b:

somevalue: bbb

someothervalue: 222

level1-c:

somevalue: ccc

someothervalue: 333

Basically i would like to setup an ‘override’ vars file (lets take a host\_vars as an example) for the single entry so that:

level0:

level1-b:  
somevalue: abc #value to override

Is overriding a single value in a dictionary possible?

Thanks for any insight.

---

<div class="post-metadata">

**Author:** ![PhilEv](https://avatars.discourse-cdn.com/v4/letter/p/ee59a6/32.png) [@PhilEv](https://forum.ansible.com/u/PhilEv)\
**Post date:** [June 14, 2017, 2:30pm UTC](https://forum.ansible.com/t/how-to-override-entry-in-a-dictionary/24721/2 "2017-06-14T14:30:17Z")

</div>

May be below can be a hint

[http://docs.ansible.com/ansible/intro\_configuration.html#hash-behaviour](http://docs.ansible.com/ansible/intro_configuration.html#hash-behaviour)

and

[http://docs.ansible.com/ansible/playbooks\_filters.html#combining-hashes-dictionaries](http://docs.ansible.com/ansible/playbooks_filters.html#combining-hashes-dictionaries)

HTH
