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:
>
>
>
>
> *failed: [server1] => (item={'job': 'do stuff', 'name': 'Gather stuff'})
> => {"failed": true, "item": {"job": "do stuff", "name": "Gather
> stuff"}}msg: this module requires key=value arguments (['name=Gather',
> 'stuff', 'job=do', 'stuff', 'state=present'])failed: [server1] =>
> (item={'job': 'sleep 5; /etc/server1/scripts/check_files >
> /tmp/check_files_results', 'name': 'Check Response Codes'}) => {"failed":
> true, "item": {"job": "sleep 5; /etc/server1/scripts/check_files >
> /tmp/check_files_results", "name": "Check Response Codes"}}msg: this module
> requires key=value arguments (['name=Check', 'Response', 'Codes',
> 'job=sleep', '5;', '/etc/server1/scripts/check_files', '>',
> '/tmp/check_files_results', 'state=present'])*
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.