diff --git a/redmine/defaults/main.yml b/redmine/defaults/main.yml index 113d0116..91248d7e 100644 --- a/redmine/defaults/main.yml +++ b/redmine/defaults/main.yml @@ -30,6 +30,8 @@ rm_autowatcher_plugin: False rm_issuereminder_plugin: False # https://github.com/arkhitech/redmine_update_reminder rm_updatereminder_plugin: False +rm_updatereminder_plugin_freq_min: 0 +rm_updatereminder_plugin_freq_hour: 0 rm_mention_plugin: False rm_mentions_plugin: False rm_defaultcustomquery_plugin: False diff --git a/redmine/tasks/redmine-plugins.yml b/redmine/tasks/redmine-plugins.yml index 8c59dde4..42d7c93e 100644 --- a/redmine/tasks/redmine-plugins.yml +++ b/redmine/tasks/redmine-plugins.yml @@ -197,10 +197,12 @@ when: rm_updatereminder_plugin notify: - Bundle install and reconfigure redmine - tags: - - redmine - - redmine_plugins - - redmine_plugins_updatereminder + tags: [ 'redmine', 'redmine_plugins', 'redmine_plugins_updatereminder' ] + +- name: Install the update reminder plugin cron job. The ruby scheduler does not work, it seems + template: src=redmine_update_reminder.cron.j2 dest=/etc/cron.d/redmine_update_reminder owner=root group=root mode=0644 + when: rm_updatereminder_plugin + tags: [ 'redmine', 'redmine_plugins', 'redmine_plugins_updatereminder' ] - name: Install the mention plugin git: repo=https://github.com/stpl/redmine_mention_plugin dest={{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}/plugins/redmine_mention_plugin update=no diff --git a/redmine/templates/redmine_update_reminder.cron.j2 b/redmine/templates/redmine_update_reminder.cron.j2 new file mode 100644 index 00000000..b657dc9d --- /dev/null +++ b/redmine/templates/redmine_update_reminder.cron.j2 @@ -0,0 +1 @@ +{{ rm_updatereminder_plugin_freq_min }} {{ rm_updatereminder_plugin_freq_hour }} * * * {{ redmine_user }} rake -f {{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}/Rakefile --silent RAILS_ENV=production redmine_update_reminder:send_reminders >{{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}/log/redmine-update_send_reminders.log 2>&1