# Cannot change a variable passed to a role from within a role - request for docs

**URL:** <https://forum.ansible.com/t/cannot-change-a-variable-passed-to-a-role-from-within-a-role-request-for-docs/45368>\
**Category:** Get Help\
**Tags:** variables, role\
**Created:** [February 19, 2026, 7:10pm UTC](https://forum.ansible.com/t/cannot-change-a-variable-passed-to-a-role-from-within-a-role-request-for-docs/45368 "2026-02-19T19:10:17Z")\
**Posts on this page:** 1\
**Showing post:** 19

<div class="post-metadata">

**Author:** ![kks](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kks/32/10352_2.png) [@kks](https://forum.ansible.com/u/kks)\
**Post date:** [February 23, 2026, 9:01am UTC](https://forum.ansible.com/t/cannot-change-a-variable-passed-to-a-role-from-within-a-role-request-for-docs/45368/19 "2026-02-23T09:01:26Z")

</div>

> [@utoddl](#):
>
> That’s true, the order would matter

I wanted to reply in this topic, but there was notice that this topic is solved and it is better create another topic.

So i did

> [@How to merge several dicts](https://forum.ansible.com/t/how-to-merge-several-dicts/45378):
>
> This is continuation from discussion started with @utoddl in topic [Cannot change a variable passed to a role from within a role - request for docs - #11 by utoddl](https://forum.ansible.com/t/cannot-change-a-variable-passed-to-a-role-from-within-a-role-request-for-docs/45368/11) The premise is following - there is a role that takes a dictionary as one of the parameters. And with dictionary there is not merging of parameters that are set on different levels - preceding values just replace values with lower precedence level as per [Using variables — Ansible Community Documentation](https://docs.ansible.com/projects/ansible/latest/playbook_guide/playbooks_variables.html#variable-precedence-where-should-i-put-a-variable) Question is how to merge confi…

This is continuation of discussion about combining dictionaries in ansible. Thank you @utoddl for making me think about this problem.

---

_[View the full topic](https://forum.ansible.com/t/cannot-change-a-variable-passed-to-a-role-from-within-a-role-request-for-docs/45368)._
