# Creates an entry like "* 5,2 * * ls -alh > /dev/null"
- Name Creates cron job to run the reports.
cron: name="daily_stats" hour="* 12 * * *" job="/home/ec2-user/send_report_stats.sh"
SNOTRA:TimePhone chrisolido$ ansible-playbook -i hosts cron.yml --check
ERROR: Syntax Error while loading YAML script, cron.yml
Note: The error may actually appear before this position: line 11, column 87
# Creates an entry like "* 5,2 * * ls -alh > /dev/null"
- cron: name="daily_stats" hour="* 12 * * *" job="/home/ec2-user/send_report_stats.sh"
^
We could be wrong, but this one looks like it might be an issue with
unbalanced quotes. If starting a value with a quote, make sure the
line ends with the same set of quotes. For instance this arbitrary
example:
foo: "bad" "wolf"
Could be written as:
foo: '"bad" "wolf"'
I tried following the example always having the same error.
TIA,
Chris
- cron: name="daily_stats" hour="* 12 * * *" job="/home/ec2-user/send_report_stats.sh"
- cron: 'name="daily_stats" hour="* 12 * * *" job="/home/ec2-user/send_report_stats.sh"'
- cron:
name: "daily_stats"
hour: "* 12 * * *"
job: "/home/ec2-user/send_report_stats.sh"
Which can be simplified to:
- cron:
name: daily_stats
hour: "* 12 * * *"
job: /home/ec2-user/send_report_stats.sh
- cron: name=daily_stats hour="* 12 * * *" job=/home/ec2-user/send_report_stats.sh
--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/bf35ade1-6587-4943-a87f-a8fedbd14de7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.