It has been superseded by debops.cron.
cron
is an ansible role which:
- installs cron
- adds cron tasks
- configures service
Using ansible-galaxy
:
$ ansible-galaxy install franklinkim.cron
Using requirements.yml
:
- src: franklinkim.apache2
Using git
:
$ git clone https://github.com/weareinteractive/ansible-cron.git franklinkim.cron
Here is a list of all the default variables for this role, which are also available in defaults/main.yml
.
# cron_tasks
# - name: ...
# cron_file: ...
# day: ...
# hour: ...
# job: ...
# minute: ...
# month: ...
# special_time: ...
# state: ...
# user: ...
# weekday: ...
#
# list of cron entries (@see http://docs.ansible.com/cron_module.html)
cron_tasks: []
# start on boot
cron_service_enabled: yes
# current state: started, stopped
cron_service_state: started
These are the handlers that are defined in handlers/main.yml
.
restart cron
- hosts: all
sudo: yes
roles:
- franklinkim.cron
vars:
cron_tasks:
- name: checking dirs
special_time: daily
job: "ls -alh > /dev/null"
$ git clone https://github.com/weareinteractive/ansible-cron.git
$ cd ansible-cron
$ vagrant up
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests and examples for any new or changed functionality.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Copyright (c) We Are Interactive under the MIT license.