# Iterate through group of variables

**URL:** <https://forum.ansible.com/t/iterate-through-group-of-variables/26879>\
**Category:** Ansible Project\
**Tags:** ansible-project\
**Created:** [March 1, 2018, 8:05pm UTC](https://forum.ansible.com/t/iterate-through-group-of-variables/26879 "2018-03-01T20:05:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [March 1, 2018, 8:05pm UTC](https://forum.ansible.com/t/iterate-through-group-of-variables/26879/1 "2018-03-01T20:05:31Z")

</div>

What are you trying to do?  
groups[item.port|string] will try to find a inventory group called 900 but that doesn't exist.
