bytepark.cronjob
Ansible-Cronjob
Ansible role for installing and setting up cronjobs.
Requirements
Only bash is needed.
Role Variables
Here’s how to define your cronjobs:
# List of cronjobs
#
# cronjobs:
# - name: 'Example cronjob'
# user: 'root'
# state: 'present' # This means the job should exist
# minute: '20' # Run at minute 20
# hour: '*' # Every hour
# day: '*' # Every day
# weekday: '*' # Every weekday
# month: '*' # Every month
# job: 'curl www.google.com' # Task to run
# special_time: 'daily' # Special timing option
cronjobs: []
If special_time
is used, the other time settings (minute, hour, day, weekday, month) won’t matter.
Dependencies
No dependencies required.
Example Playbook
- hosts: servers
roles:
- { role: bytepark.cronjob }
License
MIT
Author Information
bytepark / 2019.