# override dictionary field

**URL:** <https://forum.ansible.com/t/override-dictionary-field/20630>\
**Category:** Ansible Project\
**Created:** [February 19, 2016, 1:23pm UTC](https://forum.ansible.com/t/override-dictionary-field/20630 "2016-02-19T13:23:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tomaz\_Strukelj](https://avatars.discourse-cdn.com/v4/letter/t/b782af/32.png) [@Tomaz\_Strukelj](https://forum.ansible.com/u/Tomaz_Strukelj)\
**Post date:** [February 19, 2016, 1:23pm UTC](https://forum.ansible.com/t/override-dictionary-field/20630/1 "2016-02-19T13:23:22Z")

</div>

Using Ansible 2.0 , is there a way to override a dictionary field in vars file ?

Let’s say I have a role with default dictionary values :  
system:

packages\_default: [curl, wget, python-software-properties, mc, dvtm, ncdu, vim, htop, iotop, bmon, tree, ntp]  
apt\_mirror: False

apt\_upgrade: False  
acl\_enabled: False

And then I want to override just 1 dictionary field acl\_enabled to True.

If I try the naive way “system.acl\_enabled: True” it doesn’t work.

I thought I could use the new combine filter but it gets into a loop :

Both below assignments :

system: “{{ none|combine(system,{acl\_enabled: True}) }}”

system: “{{ system|combine({acl\_enabled: True}) }}”

results in :  
ERROR! recursive loop detected in template string

Any solution ?
