# Help with with\_items from file

**URL:** <https://forum.ansible.com/t/help-with-with-items-from-file/17723>\
**Category:** Ansible Project\
**Tags:** awx\
**Created:** [March 11, 2015, 6:41pm UTC](https://forum.ansible.com/t/help-with-with-items-from-file/17723 "2015-03-11T18:41:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chanaka\_Samarajeewa](https://avatars.discourse-cdn.com/v4/letter/c/4da419/32.png) [@Chanaka\_Samarajeewa](https://forum.ansible.com/u/Chanaka_Samarajeewa)\
**Post date:** [March 11, 2015, 6:41pm UTC](https://forum.ansible.com/t/help-with-with-items-from-file/17723/1 "2015-03-11T18:41:13Z")

</div>

Hello,

I am trying to use with\_items: from a file but I am getting the following error. I can’t find any documentation to help me with this. I’m hoping someone can help me. The error message and my files are as follows:

Error:

TASK: [cloudwatch\_alarms | include\_vars ec2-alarms.yml] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* ok: [[ec2-xx-xxx-xxx-xx.compute-1.amazonaws.com](http://ec2-xx-xxx-xxx-xx.compute-1.amazonaws.com)] TASK: [cloudwatch\_alarms | debug var=ec2-alarms] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* ok: [[ec2-xx-xxx-xxx-xx.compute-1.amazonaws.com](http://ec2-xx-xxx-xxx-xx.compute-1.amazonaws.com)] =\> { “ec2-alarms”: “{{ec2-alarms}}” } TASK: [cloudwatch\_alarms | ec2-alarms] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* fatal: [[ec2-xx-xxx-xxx-xx.compute-1.amazonaws.com](http://ec2-xx-xxx-xxx-xx.compute-1.amazonaws.com) → 127.0.0.1] =\> One or more undefined variables: ‘str object’ has no attribute ‘comparison’ FATAL: all hosts have already failed – aborting PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* to retry, use: --limit @/var/lib/awx/cloudwatch-alarms.retry

Main Task:
