# help on my loop issue

**URL:** <https://forum.ansible.com/t/help-on-my-loop-issue/19977>\
**Category:** Ansible Project\
**Created:** [December 9, 2015, 11:12pm UTC](https://forum.ansible.com/t/help-on-my-loop-issue/19977 "2015-12-09T23:12:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mgsz](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@Mgsz](https://forum.ansible.com/u/Mgsz)\
**Post date:** [December 9, 2015, 11:12pm UTC](https://forum.ansible.com/t/help-on-my-loop-issue/19977/1 "2015-12-09T23:12:21Z")

</div>

pretty new to Ansible, here is my problem, could anyone help?  
Thanks!!

within my playbook, I have following tasks:

- debug: msg=“{{ dev\_interfaces[0].name }}”
- name: debug message interface name  
debug: var=item  
with\_items: dev\_interfaces

When run the playbook:  
TASK [debug msg={{ dev\_interfaces[0].name }}] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
ok: [10.3.146.113] =\> {  
“changed”: false,  
“msg”: “Ethernet0”  
}  
TASK [debug message interface name] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
fatal: [10.3.146.113]: FAILED! =\> {“failed”: true, “msg”: “ERROR! dict object has no element {u’subnet’: u’10.0.0.0/31’, u’peer\_addr’: u’10.0.0.1’, u’name’: u’Ethernet0’, u’mask’: u’255.255.255.254’, u’prefixlen’: 31, u’addr’: u’10.0.0.0’}”}
