# nested include\_vars not overriding a variable between each loops

**URL:** <https://forum.ansible.com/t/nested-include-vars-not-overriding-a-variable-between-each-loops/22214>\
**Category:** Ansible Project\
**Created:** [August 4, 2016, 5:21pm UTC](https://forum.ansible.com/t/nested-include-vars-not-overriding-a-variable-between-each-loops/22214 "2016-08-04T17:21:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aalaesar](https://avatars.discourse-cdn.com/v4/letter/a/ac91a4/32.png) [@Aalaesar](https://forum.ansible.com/u/Aalaesar)\
**Post date:** [August 4, 2016, 5:21pm UTC](https://forum.ansible.com/t/nested-include-vars-not-overriding-a-variable-between-each-loops/22214/1 "2016-08-04T17:21:54Z")

</div>

Hello,  
I’m actually making a role for managing bind configuration but i’m stuck with what _seems to be a regression_ in my role.

**briefly :**  
Using ansible 2.1.1.0.  
The role user should be able to give a yml file containing a dict of ressource records named “records” for each zone  
Each zone is declared in a list named “zones”

for keeping the code DRY and reusable, I divided the tasks in multiple files using include in main.yml and blocks

The problem appears during the zone data generation.  
this step is an include task.yml with\_items :

extract of main.yml :

`

# generate/copy zones data

- include: create\_zone\_db.yml  
with\_items: “{{ zones }}”  
tags: setup\_zones

`

extract of create\_zone\_db.yml

`
