# Accessing Complex Variable Data

**URL:** <https://forum.ansible.com/t/accessing-complex-variable-data/12356>\
**Category:** Ansible Project\
**Tags:** ansible-project\
**Created:** [February 14, 2013, 3:35pm UTC](https://forum.ansible.com/t/accessing-complex-variable-data/12356 "2013-02-14T15:35:58Z")\
**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:** [February 14, 2013, 3:35pm UTC](https://forum.ansible.com/t/accessing-complex-variable-data/12356/1 "2013-02-14T15:35:58Z")

</div>

> Reffering to "Accessing Complex Variable Data"
> 
> First of all thank you for ansible 😉 , but now I have some questions
> 
> 1.) It should be possible to use a list(array). Can someone give an example  
> for a somelist.yml ?

see below

> 2.) Must that file be mentioned in the vars\_files section?
> 
> 3.) Or am I going totally wrong?
> 
> For example:
> 
> ---
> 
> - hosts: physical  
> &nbsp;&nbsp;user: ansible  
> &nbsp;&nbsp;sudo: yes
> 
> &nbsp;&nbsp;vars\_files:  
> &nbsp;&nbsp;&nbsp;&nbsp;- somelist.yml

Somelist would define multiple list variables by name, as a YAML  
dictionary of lists:
