uZer.crontab

ansible-role-crontab

====================

Build Status Galaxy GitHub Stars

  • This role sets up crontab and removes cron jobs/variables that are not defined in Ansible.

  • All settings should be placed in host_vars or group_vars.

  • By default, the crontab and variables are managed in the file /etc/cron.d/ansible_cron.

  • Keep in mind, deletion of cron jobs is only managed when file: ... is not used. If you want to have crontabs in different files, this role may not be very helpful since it won't be able to delete tasks from those files. In that case, you should use a traditional galaxy role.

Dependencies

None. This role should work on any Linux distribution.

Simple usage example

crontabs:
  jobs:
    - name: "Test job 1"
      job: "echo $TESTVAR1 > /tmp/testcron"

Detailed usage example

crontabs:
  vars:
    - name: "TESTVAR1"
      value: "test VALUE 2"
      user: "weirdo"
      # file: /etc/cron.d/other_cron ## Do not use this
    - ...
  jobs:
    - name: "Test job 1"
      job: "echo $TESTVAR1 > /tmp/testcron"
      minute: "0"
      hour: "2"
      day: "*"
      month: "*"
      weekday: "*"
      user: "weirdo"
    - ...

License

"THE (extended) BEER-WARE LICENSE" (Revision 42.0815):

As long as you keep this notice, you can do whatever you want with this content. If we meet one day and you think it's worth it, you can buy me a beer in return.

Author Information

Youenn Piolet

Informazioni sul progetto

Crontab management

Installa
ansible-galaxy install uZer.crontab
Licenza
other
Download
2.4k
Proprietario
What year is this?