diff --git a/tasks/cron.yml b/tasks/cron.yml index 8231fc0..9a45aa7 100644 --- a/tasks/cron.yml +++ b/tasks/cron.yml @@ -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'" diff --git a/tasks/main.yml b/tasks/main.yml index 1cd62e2..cbbcf34 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -2,6 +2,13 @@ #### --- customizations ------ +- name: install deps + apt: + name: cron + state: present + tags: + - install + - include: cron.yml tags: - redmine-ansible-cron