# with\_items: not working for me.

**URL:** <https://forum.ansible.com/t/with-items-not-working-for-me/17604>\
**Category:** Ansible Project\
**Tags:** awx\
**Created:** [February 23, 2015, 9:42pm UTC](https://forum.ansible.com/t/with-items-not-working-for-me/17604 "2015-02-23T21:42:16Z")\
**Posts on this page:** 3\
**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:** [February 23, 2015, 9:42pm UTC](https://forum.ansible.com/t/with-items-not-working-for-me/17604/1 "2015-02-23T21:42:16Z")

</div>

Hello,

Can someone please let me know why I am getting this error message when using with\_items? Error message my task are as follows.

ERROR: Syntax Error while loading YAML script, /var/lib/awx/projects/\_11813\_\_automated\_aws\_cloud\_watch\_alarms/roles/cloudwatch\_alarms/tasks/main.yml Note: The error may actually appear before this position: line 30, column 1 with\_items: - { name: ‘test-alarm’, metric: ‘CPUUtilization’ } ^ This one looks easy to fix. It seems that there is a value started with a quote, and the YAML parser is expecting to see the line ended with the same kind of quote. For instance: when: “ok” in result.stdout Could be written as: when: ‘“ok” in result.stdout’ or equivalently: when: “‘ok’ in result.stdout”

TASK:

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [February 23, 2015, 11:44pm UTC](https://forum.ansible.com/t/with-items-not-working-for-me/17604/2 "2015-02-23T23:44:45Z")

</div>

you indented with\_items too much

---

<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:00pm UTC](https://forum.ansible.com/t/with-items-not-working-for-me/17604/3 "2015-03-11T18:00:00Z")

</div>

Thanks for the help!
