Skip to content

Instantly share code, notes, and snippets.

@mgirouard
Last active September 3, 2015 17:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mgirouard/7025ec0ac20ebfaf8111 to your computer and use it in GitHub Desktop.
Save mgirouard/7025ec0ac20ebfaf8111 to your computer and use it in GitHub Desktop.
Issue Type:

Documentation Report

Ansible Version:

1.9.2

Ansible Configuration:

Default

Environment:

Local: MacOS Yosemitie Remote: Centos 7

Summary:

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.

Steps To Reproduce:

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"
Expected Results:

The task should run without error

TASK: [Install logwatch cron job for root] ************************************
ok: [default]
Actual Results:
TASK: [Install logwatch cron job for root] ************************************
failed: [default] => {"failed": true}
msg: missing required arguments: name

FATAL: all hosts have already failed -- aborting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment