# Overriding variables "include\_vars" with "vars\_files"

**URL:** <https://forum.ansible.com/t/overriding-variables-include-vars-with-vars-files/18920>\
**Category:** Ansible Project\
**Created:** [August 2, 2015, 6:31pm UTC](https://forum.ansible.com/t/overriding-variables-include-vars-with-vars-files/18920 "2015-08-02T18:31:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martin\_Vehovsky](https://avatars.discourse-cdn.com/v4/letter/m/e9bcb4/32.png) [@Martin\_Vehovsky](https://forum.ansible.com/u/Martin_Vehovsky)\
**Post date:** [August 2, 2015, 6:31pm UTC](https://forum.ansible.com/t/overriding-variables-include-vars-with-vars-files/18920/1 "2015-08-02T18:31:07Z")

</div>

Hi,

recently I added this ticket to V2: [https://github.com/ansible/ansible/issues/11807](https://github.com/ansible/ansible/issues/11807)

It was closed with explanation that this is expected behaviour. I will have to argue on this one.

Lets say that **roleA** installs i don’t know Apache Maven or what ever and **MY\_VARIABLE** would be version that should be installed. For some reason it uses **_include\_vars_** for including **MY\_VARIABLE**.  
Now lets say **roleB** is generic role, that will install all my different web apps, all I have to do is to provide different **_vars\_files_** for the play. So I will provide version of my web app to be installed again in variable **MY\_VARIABLE.** And unexpectedly when these roles will be used in same playbook (different plays of course) it will not work, as demonstrated in the ticket.

So I ask, why should some hidden **_include\_vars_** task in some role from different play have higher priority than **_vars\_files_** I specify in the current play?

Thanks  
Martin
