Cron with_items hash + spaces

Another question folks.

When I try the following bit of code, it seems to choke:

10 - name: set cron for any cron-able scripts
11 cron: name={{ item.name }} job={{ item.job }} state=present
12 with_items:
13 - { name: Gather stuff, job: do stuff }
14 - { name: “Check Response Codes”, job: “sleep 5; /etc/server1/scripts/check_files > /tmp/check_files_results” }

However, if I do the following, it works:

10 - name: set cron for any cron-able scripts
11 cron: name={{ item.name }} job={{ item.job }} state=present
12 with_items:
13 - { name: Gather, job: do }
14 - { name: “Check”, job: “sleep” }

Basically, it seems the spaces are throwing things off. I’ve tried with single quotes, double quotes, etc. etc.
Below, is the error:

param=“{{ var }}”

– Michael

a lot closer! i should have thought of / realized that. Looks like something is still not happy:

so it seems the space after name= " was the problem.

The reason I put that space there is because the syntax highlighting in VIM completely got thrown off by having name=“…but either way (even with the bad syntax highlighting), it still works properly now that i have name=”

Thanks!!! :slight_smile: