# Parsing Error

**URL:** <https://forum.ansible.com/t/parsing-error/12266>\
**Category:** Ansible Project\
**Created:** [January 30, 2013, 6:04pm UTC](https://forum.ansible.com/t/parsing-error/12266 "2013-01-30T18:04:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steve1](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@Steve1](https://forum.ansible.com/u/Steve1)\
**Post date:** [January 30, 2013, 6:04pm UTC](https://forum.ansible.com/t/parsing-error/12266/1 "2013-01-30T18:04:50Z")

</div>

I’ve been using the below task successfully for a while, and then I just updated ansible (it was probably 3 weeks stale) and now the user\_data line below gets a parsing error.

- name: Launch New Server Instances  
local\_action: ec2  
keypair=${grp\_name}  
group=${grp\_name}  
instance\_type=${item.instance}  
image=${item.image}  
wait=true  
user\_data=‘{“servertype”:“${item.type}”,“group”:“${grp\_name}”,“name”:“${item.name}”}’

register: instres  
with\_items: ${instances}

TASK: [Launch New Server Instances] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
failed: [127.0.0.1] =\> (item={‘instance’: ‘t1.micro’, ‘image’: ‘ami-3d4ff254’, ‘type’: ‘app’, ‘name’: ‘app1’}) =\> {“failed”: true, “item”: {“image”: “ami-3d4ff254”, “instance”: “t1.micro”, “name”: “app1”, “type”: “app”}, “parsed”: false}

If I comment it out the task works. “-v -v -v” doesn’t add any extra info.

---

<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:** [January 30, 2013, 6:12pm UTC](https://forum.ansible.com/t/parsing-error/12266/2 "2013-01-30T18:12:24Z")

</div>

Can you test this with ./hacking/test-module locally and see if you  
get more info?

On another note -- parsed errors should always output what data they  
get back when errors are recieved so we need to fix this bug. It is  
probably crashing with a python error and not reporting stderr  
correctly all the way up the stack.

Let us know more info and we can figure out how to fix error reporting  
more properly in this case also.

---

<div class="post-metadata">

**Author:** ![Steve1](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@Steve1](https://forum.ansible.com/u/Steve1)\
**Post date:** [January 30, 2013, 7:15pm UTC](https://forum.ansible.com/t/parsing-error/12266/3 "2013-01-30T19:15:46Z")

</div>

My mistake. Accidentally added a character in the ec2 file when I was looking at the changes and before i synced it over to my server. I figured it was the playbook file with the parse error and not the module itself.

---

<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:** [January 30, 2013, 7:36pm UTC](https://forum.ansible.com/t/parsing-error/12266/4 "2013-01-30T19:36:31Z")

</div>

Yeah, I still think remote tracebacks out to work out a little better.  
I'll take a look at it.

Glad it wasn't something else.
