tehtbl.cron

Build status

Role Description

This role installs the cron service and helps schedule tasks on a system.

Example Playbook

Here’s an example playbook that uses this role. It is tested with every update.

---
- name: Converge
  hosts: all
  become: true
  gather_facts: false

  roles:
    - role: tehtbl.cron

Before using the cron role, make sure your system is ready. I use this playbook to set everything up.

---
- name: Prepare
  hosts: all
  become: true
  gather_facts: false

  roles:
    - role: tehtbl.bootstrap

Role Variables

There are no preset variables for this role.

Requirements

  • You need access to a repository with necessary packages, probably online.
  • A recent version of Ansible is required. (Tests are carried out on the latest, previous, and next versions of Ansible.)

Context

This role works well with many other compatible roles. Check out my other roles for more details.

Compatibility

This role has been tested on these Docker images:

Container Tag Allow Failures
debian stable no
debian testing no
debian unstable yes
ubuntu xenial yes
ubuntu bionic no
ubuntu focal no
ubuntu devel yes

It has also been tested on these versions of Ansible:

Testing Using Tox

Unit tests are performed with every commit, pull request, and release.

If you find any problems, please report them on GitHub.

Testing is done using Tox and Molecule:

Tox enables testing multiple versions of Ansible. Molecule allows for testing on various distributions.

To run default tests (with any installed Ansible version, namespace: tehtbl, image: ubuntu, tag: latest):

molecule test

# Or specify a different image:
IMAGE="ubuntu" molecule test

# Or choose a specific image and tag:
IMAGE="debian" TAG="stable" tox

You can also test multiple Ansible versions and choose the appropriate images:

Tox supports testing multiple versions of Ansible. To run the default tests:

tox

# To run tests for Ubuntu:
IMAGE="ubuntu" tox

# Or customize further:
IMAGE="debian" TAG="stable" tox -e py37-ansible-current

Testing Using Vagrant

To install vagrant plugins, run:

vagrant plugin install vagrant-reload

Start tests using VirtualBox as the provider:

vagrant up

License

MIT License

Author Information

Sources

This work is inspired by the amazing contributions of many people, including Robert de Bock, Jeff Geerling, and Thomas Waldmann. Thank you!

Informazioni sul progetto

Install cron and schedule jobs on a system.

Installa
ansible-galaxy install tehtbl.cron
Licenza
mit
Download
919
Proprietario