Skip to content

Commit

Permalink
fixes for cron dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
pablodav committed Mar 19, 2019
1 parent 9b641bb commit ae18140
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tasks/cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
# http://www.redmine.org/projects/redmine/wiki/EmailConfiguration
# http://www.redmine.org/projects/redmine/wiki/RedmineReminderEmails

- name: ensure /etc/cron.d exists
file:
path: '/etc/cron.d'
state: directory

- name: cronenv prepare SHELL env var to run tasks
cronvar:
name: SHELL
value: /bin/bash
cron_file: 'redmine_server'

- cron: name='redmine redminders for mon to thursday'
job="cd {{ redmine_dir }} && bash -c 'source {{ rvm_path }} && RAILS_ENV=production rake redmine:send_reminders days=1 RAILS_ENV=production > /dev/null'"
Expand Down
7 changes: 7 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

#### --- customizations ------

- name: install deps
apt:
name: cron
state: present
tags:
- install

- include: cron.yml
tags:
- redmine-ansible-cron

0 comments on commit ae18140

Please sign in to comment.