buluma.cron
Ansible Role cron
This role helps you install cron and set up scheduled jobs on your system.
GitHub | Version | Issues | Pull Requests | Downloads |
---|---|---|---|---|
Example Playbook
Here’s a simple example taken from molecule/default/converge.yml
that is tested on every change.
---
- name: Converge
hosts: all
become: true
gather_facts: true
roles:
- role: buluma.cron
cron_jobs:
- name: my_job
# Runs every 10 minutes
minute: "*/10"
# At the 23rd hour (11 PM)
hour: 23
# For the first half of the month
day: "1-15"
# Command to run
job: "ls -l"
# This job runs as the root user
user: root
Make sure your machine is ready. In CI, this is done using molecule/default/prepare.yml
:
---
- name: Prepare
hosts: all
become: true
gather_facts: false
roles:
- role: buluma.bootstrap
For a complete guide, check out this detailed explanation and example on using these roles.
Role Variables
Default variable settings are in defaults/main.yml
:
---
# Default values for cron
# The shell used for running cron jobs.
cron_shell: /bin/bash
# The path used for running jobs.
cron_path: /sbin:/bin:/usr/sbin:/usr/bin
# The email address for cron notifications.
cron_mailto: root
Requirements
- You need the pip packages listed in requirements.txt.
State of Used Roles
These roles help prepare your system. You can choose a different way to prepare yours.
Requirement | GitHub | Version |
---|---|---|
buluma.bootstrap |
Context
This role works with many other compatible roles. Check the documentation of these roles for more information.
Here’s an overview of related roles:
Compatibility
This role has been tested with the following container images:
container | tags |
---|---|
Alpine | all |
Amazon | Candidate |
EL | 8 |
Debian | all |
Fedora | all |
opensuse | all |
Ubuntu | all |
You need at least Ansible version 2.10, and testing has been done on:
- The previous version
- The current version
- The development version
If you find any issues, please report them on GitHub.
Changelog
View the Role History.
License
This role is licensed under Apache-2.0.
Author Information
Created by Shadow Walker.
Install cron and scedule jobs on your system.
ansible-galaxy install buluma.cron