# How to override a role default dictionary variable value from command line

**URL:** <https://forum.ansible.com/t/how-to-override-a-role-default-dictionary-variable-value-from-command-line/22223>\
**Category:** Ansible Project\
**Created:** [August 5, 2016, 3:49pm UTC](https://forum.ansible.com/t/how-to-override-a-role-default-dictionary-variable-value-from-command-line/22223 "2016-08-05T15:49:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ajay\_B](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@Ajay\_B](https://forum.ansible.com/u/Ajay_B)\
**Post date:** [August 5, 2016, 3:49pm UTC](https://forum.ansible.com/t/how-to-override-a-role-default-dictionary-variable-value-from-command-line/22223/1 "2016-08-05T15:49:13Z")

</div>

I have in a role(A) a dictionary variable defined under defaults as follows :  
ceph\_disks:  
/dev/vdb: “/es1”

This role A is being included in another role B thru dependencies in meta file. When this role B is executed and command line argument passed thru extra vars as follows:  
–extra-vars=“env=thor storage\_type=ceph {‘ceph\_disks’:{‘/dev/vdb’: ‘hdfs’}}”

This value is not being overridden for default value of es1 defined earlier.

How to override this default value ?

Thanks
