# Ansible role variables

**URL:** <https://forum.ansible.com/t/ansible-role-variables/24965>\
**Category:** Ansible Project\
**Created:** [July 12, 2017, 3:03pm UTC](https://forum.ansible.com/t/ansible-role-variables/24965 "2017-07-12T15:03:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martin\_Jablecnik](https://avatars.discourse-cdn.com/v4/letter/m/c89c15/32.png) [@Martin\_Jablecnik](https://forum.ansible.com/u/Martin_Jablecnik)\
**Post date:** [July 12, 2017, 3:03pm UTC](https://forum.ansible.com/t/ansible-role-variables/24965/1 "2017-07-12T15:03:34Z")

</div>

Hello I have Ansible 2.3.0.0 with this roles in playbook:

```auto
- { role: bwt-container, tags: ['bwt_en', 'bwt'], vars: { app_lang: "en" } }
- { role: bwt-container, tags: ['bwt_de', 'bwt'], vars: { app_lang: "de" } }
 

```

BWT application have various languages, which I would like define in vars. But when I run:

```auto
ansible-playbook -v site.yml --limit test-server --tags bwt_en 

```

So app\_lang variable have “de” value…  
Why??  
I would like have 2 containers with various languages…  
Do you know anyone how resolve it??

[https://superuser.com/questions/1229183/ansible-role-variables](https://superuser.com/questions/1229183/ansible-role-variables)

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [July 14, 2017, 3:01pm UTC](https://forum.ansible.com/t/ansible-role-variables/24965/2 "2017-07-14T15:01:28Z")

</div>

You have a bug in your code and since you have not provided the code it's hard to help.

---

<div class="post-metadata">

**Author:** ![Trond\_Hindenes](https://avatars.discourse-cdn.com/v4/letter/t/96bed5/32.png) [@Trond\_Hindenes](https://forum.ansible.com/u/Trond_Hindenes)\
**Post date:** [July 14, 2017, 11:07pm UTC](https://forum.ansible.com/t/ansible-role-variables/24965/3 "2017-07-14T23:07:50Z")

</div>

I think I’ve seen this somewhere else as well.

Maybe look into implementing it as a play using multiple include\_role tasks instead?
