Documentation Report
1.9.2
Default
Local: MacOS Yosemitie Remote: Centos 7
The documentation states that the name
parameter on the cron task is not required, but upon running a cron task without specifying the name, the play fails.
I haven't looked into the significance to the name parameter, but I'm assuming it's important. When I updated my playbook to include the name, I couldn't see it displayed in the output. If it's used internally, it's perhaps best to simply update the docs to note the correct value. If it's not actually required, I'd recommend updating the module to not force the required value.
Create a playbook with a cron task, like the following:
---
- hosts: all
- tasks:
- name: Install logwatch cron job for root
cron: name="Nightly Logwatch" hour=0 minute=0 job="logwatch"
The task should run without error
TASK: [Install logwatch cron job for root] ************************************
ok: [default]
TASK: [Install logwatch cron job for root] ************************************
failed: [default] => {"failed": true}
msg: missing required arguments: name
FATAL: all hosts have already failed -- aborting