New in version 2.0.
If set, create a backup of the crontab before it is modified. The location of the backup is returned in the
If specified, uses this file instead of an individual user's crontab. Without a leading /, this is assumed to be in /etc/cron.d. With a leading /, this is taken as absolute.
Name of the crontab variable.
Whether to ensure that the variable is present or absent.
The specific user whose crontab should be modified.
The value to set this variable to. Required if state=present.
# Ensure a variable exists. # Creates an entry like "[email protected]" - cronvar: name: EMAIL value: [email protected] # Make sure a variable is gone. This will remove any variable named # "LEGACY" - cronvar: name: LEGACY state: absent # Adds a variable to a file under /etc/cron.d - cronvar: name: LOGFILE value: /var/log/yum-autoupdate.log user: root cron_file: ansible_yum-autoupdate
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
This module is community maintained without core committer oversight.
For more information on what this means please read Module Support