# Roles and Includes

**URL:** <https://forum.ansible.com/t/roles-and-includes/22714>\
**Category:** Ansible Project\
**Created:** [October 4, 2016, 3:11am UTC](https://forum.ansible.com/t/roles-and-includes/22714 "2016-10-04T03:11:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paul\_Nicholson](https://avatars.discourse-cdn.com/v4/letter/p/3ab097/32.png) [@Paul\_Nicholson](https://forum.ansible.com/u/Paul_Nicholson)\
**Post date:** [October 4, 2016, 3:11am UTC](https://forum.ansible.com/t/roles-and-includes/22714/1 "2016-10-04T03:11:05Z")

</div>

Hello,

I have encountered a bug the latest ansible that I’m trying to figure out.  
It works in 2.0.1.0 but fails in 2.1.1.0. It seems like the variable scope gets broken when using includes inside a roles tasks yml.  
I have produced an example on github that exposes the bug. [https://github.com/paulnicholson/AnsibleTest](https://github.com/paulnicholson/AnsibleTest)

Thanks for the help!

Paul

---

<div class="post-metadata">

**Author:** ![Paul\_Nicholson](https://avatars.discourse-cdn.com/v4/letter/p/3ab097/32.png) [@Paul\_Nicholson](https://forum.ansible.com/u/Paul_Nicholson)\
**Post date:** [October 4, 2016, 2:49pm UTC](https://forum.ansible.com/t/roles-and-includes/22714/2 "2016-10-04T14:49:55Z")

</div>

This is fixed in 2.1.2.0. Sorry for the noise, I didn’t notice the new version until after posting.
