ansible-role-redmine/handlers/main.yml

48 lines
1.7 KiB
YAML

---
- name: Reload unicorn
service: name={{ redmine_systemd_service_name }} state=restarted
- name: Reload unicorn when needed
service: name={{ redmine_systemd_service_name }} state=restarted
- name: Reconfigure redmine
shell: cd {{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}; bundle exec rake redmine:plugins:migrate RAILS_ENV=production
notify:
- 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
- name: Bundle install
shell: cd {{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}; bundle install --without development test mysql RAILS_ENV=production
notify:
- 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
- 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
notify:
- Reload unicorn
- name: change the redmine permissions recursively
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