# Variable data structures in playbooks now nestable however you want

**URL:** <https://forum.ansible.com/t/variable-data-structures-in-playbooks-now-nestable-however-you-want/11403>\
**Category:** Ansible Project\
**Created:** [April 11, 2012, 1:05am UTC](https://forum.ansible.com/t/variable-data-structures-in-playbooks-now-nestable-however-you-want/11403 "2012-04-11T01:05:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [April 11, 2012, 1:05am UTC](https://forum.ansible.com/t/variable-data-structures-in-playbooks-now-nestable-however-you-want/11403/1 "2012-04-11T01:05:33Z")

</div>

I’ve pushed some changes to the integration branch that allows variables via the ‘vars’ section (and I believe vars\_files, though I haven’t tested this fully yet) to be kept as structured data.

This means you are able to do stuff like:

vars:  
asdf: jkl  
favcolor: blue  
alist:

- duck
- duck
- goose  
adict:  
key: value  
key2: value2

And that structure will be preserved when fed to templates, among other things.

It’s on the integration branch now – I’ll let some folks test it a bit before I merge it into master.

No module changes are required other than the changes I’ve made to the setup module to support this.

–Michael
