community.general.cronvar – Manage variables in crontabs¶
Note
This plugin is part of the community.general collection (version 2.5.1).
To install it use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.cronvar
.
Synopsis¶
Use this module to manage crontab variables.
This module allows you to create, update, or delete cron variable definitions.
Parameters¶
Examples¶
- name: Ensure entry like "[email protected]" exists
community.general.cronvar:
name: EMAIL
value: [email protected]
- name: Ensure a variable does not exist. This may remove any variable named "LEGACY"
community.general.cronvar:
name: LEGACY
state: absent
- name: Add a variable to a file under /etc/cron.d
community.general.cronvar:
name: LOGFILE
value: /var/log/yum-autoupdate.log
user: root
cron_file: ansible_yum-autoupdate
Authors¶
Doug Luce (@dougluce)