Fix the installation of the closes resolved issues plugin.

This commit is contained in:
Andrea Dell'Amico 2021-05-22 18:05:00 +02:00
parent a95ac14a7d
commit 4a4c6d5761
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
2 changed files with 30 additions and 9 deletions

View File

@ -8,31 +8,40 @@
- name: Reconfigure redmine
shell: cd {{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}; bundle exec rake redmine:plugins:migrate RAILS_ENV=production
notify:
- Reload unicorn when needed
- Reload unicorn
- name: Reconfigure agile plugin
shell: cd {{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}; bundle exec rake redmine:plugins NAME=redmine_agile RAILS_ENV=production
notify:
- Reload unicorn when needed
- Reload unicorn
- name: Bundle install
shell: cd {{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}; bundle install --without development test mysql RAILS_ENV=production
notify:
- Reload unicorn when needed
- Reload unicorn
- name: Bundle install and reconfigure redmine
shell: cd {{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}; bundle install ; bundle exec rake redmine:plugins:migrate RAILS_ENV=production
notify:
- Reload unicorn when needed
- Reload unicorn
- name: Remove a plugin and reconfigure redmine
shell: cd {{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}; bundle exec rake redmine:plugins:migrate NAME=redmine_plugin_name VERSION=0 RAILS_ENV=production
shell: cd {{ redmine_glob_root_dir }}/{{ redmine_inst_dir }} && bundle exec rake redmine:plugins:migrate NAME=redmine_plugin_name VERSION=0 RAILS_ENV=production
notify:
- Reload unicorn when needed
- Reload unicorn
- name: change the redmine permissions recursively
shell: chown -R {{ redmine_user }}:{{ redmine_group }} {{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}/files {{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}/log {{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}/tmp {{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}/public/plugin_assets
ignore_errors: True
file:
dest: '{{ item }}'
owner: '{{ redmine_user }}'
group: '{{ redmine_group }}'
state: directory
recurse: yes
loop:
- '{{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}/files'
- '{{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}/log'
- '{{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}/tmp'
- '{{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}/public/plugin_assets'
- name: Reload systemd after the system unit installation
systemd: daemon_reload=yes

View File

@ -153,12 +153,24 @@
tags: [ 'redmine', 'redmine_plugins', 'redmine_plugins_defaultcustomquery' ]
- name: Install the closes resolved issues plugin
git: repo={{ rm_closesresolvedissue_url }} dest={{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}/plugins/redmine_closes_resolved_issues update=no
git:
repo: '{{ rm_closesresolvedissue_url }}'
dest: '{{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}/plugins/redmine_closes_resolved_issues'
update: no
when: rm_closesresolvedissue_plugin
notify:
- Bundle install and reconfigure redmine
tags: [ 'redmine', 'redmine_plugins', 'redmine_plugins_closesresolvedissue' ]
- name: Install the tasks handler for the close resolved issues plugin
copy:
src: '{{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}/plugins/redmine_closes_resolved_issues/config/initializers/task_scheduler.rb'
remote_src: True
dest: '{{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}/config/initializers/task_scheduler.rb'
notify: Reload unicorn
when: rm_closesresolvedissue_plugin
tags: [ 'redmine', 'redmine_plugins', 'redmine_plugins_closesresolvedissue' ]
- name: Install the default assign plugin
git: repo={{ rm_defaultassign_url }} dest={{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}/plugins/redmine_default_assign update=no
when: rm_defaultassign_plugin