diff --git a/redmine/defaults/main.yml b/redmine/defaults/main.yml index 4173c8d4..0e2ee732 100644 --- a/redmine/defaults/main.yml +++ b/redmine/defaults/main.yml @@ -30,6 +30,9 @@ rm_advanced_roadmap_plugin: False rm_scrum2b_plugin: False rm_autowatcher_plugin: False rm_issuereminder_plugin: False +rm_issue_reminder_plugin_freq_min: 0 +rm_issue_reminder_plugin_freq_hour: 5 +rm_issue_reminder_plugin_freq_weekday: 1 # https://github.com/arkhitech/redmine_update_reminder # We configure to send the email reminders once a week on monday morning by default rm_updatereminder_plugin: False diff --git a/redmine/tasks/redmine-plugins.yml b/redmine/tasks/redmine-plugins.yml index d9374637..53c3f3bd 100644 --- a/redmine/tasks/redmine-plugins.yml +++ b/redmine/tasks/redmine-plugins.yml @@ -150,10 +150,12 @@ when: rm_issuereminder_plugin notify: - Bundle install and reconfigure redmine - tags: - - redmine - - redmine_plugins - - redmine_plugins_issuereminder + tags: [ 'redmine', 'redmine_plugins', 'redmine_plugins_issuereminder' ] + +- name: Install the issue reminder plugin cron job. + template: src=redmine_issue_reminder.cron.j2 dest=/etc/cron.d/redmine_issue_reminder owner=root group=root mode=0644 + when: rm_issuereminder_plugin + tags: [ 'redmine', 'redmine_plugins', 'redmine_plugins_issuereminder' ] - name: Install the update reminder plugin git: repo=https://github.com/arkhitech/redmine_update_reminder dest={{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}/plugins/redmine_update_reminder update=no diff --git a/redmine/templates/redmine_issue_reminder.cron.j2 b/redmine/templates/redmine_issue_reminder.cron.j2 new file mode 100644 index 00000000..0322a44b --- /dev/null +++ b/redmine/templates/redmine_issue_reminder.cron.j2 @@ -0,0 +1 @@ +{{ rm_issue_reminder_plugin_freq_min }} {{ rm_issue_reminder_plugin_freq_hour }} * * {{ rm_issue_reminder_plugin_freq_weekday }} {{ redmine_user }} /usr/local/bin/rake -f {{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}/Rakefile --silent RAILS_ENV=production reminder:exec >{{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}/log/redmine-issue_reminder.log 2>&1