2015-05-28 11:32:57 +02:00
|
|
|
---
|
|
|
|
- name: apache2 reload
|
|
|
|
service: name=apache2 state=reloaded
|
2019-02-18 17:37:51 +01:00
|
|
|
when: ruby_use_mod_passenger
|
2015-05-28 11:32:57 +02:00
|
|
|
|
|
|
|
- name: apache2 reload when needed
|
|
|
|
service: name=apache2 state=reloaded
|
2019-02-18 17:37:51 +01:00
|
|
|
when: ruby_use_mod_passenger
|
|
|
|
|
2015-05-28 11:32:57 +02:00
|
|
|
# NB: we set 1.9.1, but if ruby1.9.3 is installed the real default is 1.9.3. Blame debian/ubuntu
|
|
|
|
- name: set ruby 1.9.3 as default
|
|
|
|
# shell: update-alternatives --set ruby /usr/bin/ruby1.9.1
|
|
|
|
alternatives: name=ruby path=/usr/bin/ruby1.9.1
|
|
|
|
when: is_precise
|
|
|
|
ignore_errors: True
|
|
|
|
|
|
|
|
# NB: we set 1.9.1, but if gem1.9.3 is installed the real default is 1.9.3. Blame debian/ubuntu
|
|
|
|
- name: set gem 1.9.3 as default
|
|
|
|
# shell: update-alternatives --set gem /usr/bin/gem1.9.1
|
|
|
|
alternatives: name=gem path=/usr/bin/gem1.9.1
|
|
|
|
when: is_precise
|
|
|
|
ignore_errors: True
|
|
|
|
|
|
|
|
- name: Reload unicorn
|
2019-02-18 17:37:51 +01:00
|
|
|
service: name={{ redmine_sysvinit_service_name }} state=reloaded
|
|
|
|
when: ansible_service_mgr != 'systemd'
|
|
|
|
|
|
|
|
- name: Reload unicorn
|
|
|
|
service: name={{ redmine_systemd_service_name }} state=reloaded
|
|
|
|
when: ansible_service_mgr == 'systemd'
|
|
|
|
|
|
|
|
- name: Reload unicorn when needed
|
|
|
|
service: name={{ redmine_sysvinit_service_name }} state=restarted
|
|
|
|
when:
|
|
|
|
- ruby_use_unicorn
|
|
|
|
- ansible_service_mgr != 'systemd'
|
2015-05-28 11:32:57 +02:00
|
|
|
|
|
|
|
- name: Reload unicorn when needed
|
2019-02-18 17:37:51 +01:00
|
|
|
service: name={{ redmine_systemd_service_name }} state=restarted
|
|
|
|
when:
|
|
|
|
- ruby_use_unicorn
|
|
|
|
- ansible_service_mgr == 'systemd'
|
2015-05-28 11:32:57 +02:00
|
|
|
|
|
|
|
- name: Reconfigure redmine
|
|
|
|
shell: cd {{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}; bundle exec rake redmine:plugins:migrate RAILS_ENV=production
|
|
|
|
notify:
|
|
|
|
- apache2 reload when needed
|
|
|
|
- Reload unicorn when needed
|
|
|
|
|
|
|
|
- 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:
|
|
|
|
- apache2 reload when needed
|
|
|
|
- Reload unicorn when needed
|
|
|
|
|
|
|
|
- name: Bundle install
|
|
|
|
shell: cd {{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}; bundle install --without development test mysql RAILS_ENV=production
|
|
|
|
notify:
|
|
|
|
- apache2 reload when needed
|
|
|
|
- Reload unicorn when needed
|
|
|
|
|
|
|
|
- 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:
|
|
|
|
- apache2 reload when needed
|
|
|
|
- Reload unicorn when needed
|
|
|
|
|
|
|
|
- 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:
|
|
|
|
- apache2 reload when needed
|
|
|
|
- Reload unicorn when needed
|
|
|
|
|
|
|
|
- name: Generate the mod-passenger executable
|
|
|
|
shell: passenger-install-apache2-module -a
|
|
|
|
when: ruby_use_mod_passenger
|
|
|
|
|
|
|
|
- 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
|