# Regression in variables when including playbooks

**URL:** <https://forum.ansible.com/t/regression-in-variables-when-including-playbooks/12648>\
**Category:** Ansible Project\
**Created:** [April 8, 2013, 1:24pm UTC](https://forum.ansible.com/t/regression-in-variables-when-including-playbooks/12648 "2013-04-08T13:24:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![GW1](https://avatars.discourse-cdn.com/v4/letter/g/c89c15/32.png) [@GW1](https://forum.ansible.com/u/GW1)\
**Post date:** [April 8, 2013, 1:24pm UTC](https://forum.ansible.com/t/regression-in-variables-when-including-playbooks/12648/1 "2013-04-08T13:24:38Z")

</div>

Hi,

I think I found a regression in Ansible 1.2 develop branch. Afaik the following worked in the 1.1 develop branch around 1 week ago.

# \_test\_site.yml

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [April 8, 2013, 3:32pm UTC](https://forum.ansible.com/t/regression-in-variables-when-including-playbooks/12648/2 "2013-04-08T15:32:14Z")

</div>

Ok, that’s worth chasing, please make sure there is a github ticket filed.

However, I’ve never been a fan of task includes + with\_items – namely because it can’t traverse variables of inventory scope – and that frequent confusion is why task includes + with\_items is undocumented.

It is much better to put the “with\_items” loop inside your tasks themselves, because then it has access to inventory scoped variables – suppose a list of users to set up is unique per group, etc.

---

<div class="post-metadata">

**Author:** ![GW1](https://avatars.discourse-cdn.com/v4/letter/g/c89c15/32.png) [@GW1](https://forum.ansible.com/u/GW1)\
**Post date:** [April 8, 2013, 3:48pm UTC](https://forum.ansible.com/t/regression-in-variables-when-including-playbooks/12648/3 "2013-04-08T15:48:12Z")

</div>

Done. [https://github.com/ansible/ansible/issues/2612](https://github.com/ansible/ansible/issues/2612)

Greetings,  
gw
