# roles variable inheritance / override bug in 1.8.2

**URL:** <https://forum.ansible.com/t/roles-variable-inheritance-override-bug-in-1-8-2/17085>\
**Category:** Ansible Project\
**Created:** [December 17, 2014, 4:57am UTC](https://forum.ansible.com/t/roles-variable-inheritance-override-bug-in-1-8-2/17085 "2014-12-17T04:57:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steve\_Kieu](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@Steve\_Kieu](https://forum.ansible.com/u/Steve_Kieu)\
**Post date:** [December 17, 2014, 4:57am UTC](https://forum.ansible.com/t/roles-variable-inheritance-override-bug-in-1-8-2/17085/1 "2014-12-17T04:57:52Z")

</div>

Hi,

Not sure if this is known, with ansible 1.8.2 I found:

role B depend on role A

In role A vars/main.yml set variable like TEST: ‘a’  
In role B vars/main.yml set variable like TEST: ‘b’

Playbook using role B and debug print that the variable has the value: ‘a’

I have to downgrade to 1.7.2 which has correct behaviour.

Thanks

---

<div class="post-metadata">

**Author:** ![Tristan\_Bessoussa](https://avatars.discourse-cdn.com/v4/letter/t/b782af/32.png) [@Tristan\_Bessoussa](https://forum.ansible.com/u/Tristan_Bessoussa)\
**Post date:** [January 13, 2015, 9:28am UTC](https://forum.ansible.com/t/roles-variable-inheritance-override-bug-in-1-8-2/17085/2 "2015-01-13T09:28:56Z")

</div>

I got the exact same problem on 1.8.2.

---

<div class="post-metadata">

**Author:** ![Steve\_Kieu](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@Steve\_Kieu](https://forum.ansible.com/u/Steve_Kieu)\
**Post date:** [April 20, 2015, 12:39am UTC](https://forum.ansible.com/t/roles-variable-inheritance-override-bug-in-1-8-2/17085/3 "2015-04-20T00:39:30Z")

</div>

Looks like 1.8.4 the problem is fixed.

cheers
