# set\_fact/include/role vars precedence

**URL:** <https://forum.ansible.com/t/set-fact-include-role-vars-precedence/20789>\
**Category:** Ansible Project\
**Created:** [March 7, 2016, 9:01am UTC](https://forum.ansible.com/t/set-fact-include-role-vars-precedence/20789 "2016-03-07T09:01:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Takeshi\_Yaegashi](https://avatars.discourse-cdn.com/v4/letter/t/838e76/32.png) [@Takeshi\_Yaegashi](https://forum.ansible.com/u/Takeshi_Yaegashi)\
**Post date:** [March 7, 2016, 9:01am UTC](https://forum.ansible.com/t/set-fact-include-role-vars-precedence/20789/1 "2016-03-07T09:01:24Z")

</div>

Hi,

I’m confused with variable precedence of Ansible 2.0 documented in [http://docs.ansible.com/ansible/playbooks\_variables.html#variable-precedence-where-should-i-put-a-variable](http://docs.ansible.com/ansible/playbooks_variables.html#variable-precedence-where-should-i-put-a-variable) . Suppose I have playbooks and roles as follows:

hosts (inventory):

`

[default]  
localhost x=1

`

roles/a/tasks/main.yml (task in role a):

`
