2015-05-28 11:32:57 +02:00
|
|
|
---
|
|
|
|
- name: Install the unicorn ruby-on-rails service
|
|
|
|
gem: name={{ item }} state=latest
|
|
|
|
with_items:
|
|
|
|
- unicorn
|
|
|
|
when: ruby_use_unicorn
|
2015-09-18 18:45:32 +02:00
|
|
|
tags: [ 'ruby', 'redmine', 'unicorn' ]
|
2015-05-28 11:32:57 +02:00
|
|
|
|
|
|
|
- name: Create the unicorn log directory
|
|
|
|
file: dest={{ unicorn_log_dir }} state=directory owner={{ redmine_user }} group={{ redmine_user }} mode=0750
|
2015-09-18 18:45:32 +02:00
|
|
|
tags: [ 'ruby', 'redmine', 'unicorn' ]
|
2015-05-28 11:32:57 +02:00
|
|
|
|
|
|
|
- name: Create the unicorn pid directory
|
|
|
|
file: dest=/var/run/unicorn state=directory owner={{ redmine_user }} group={{ redmine_user }} mode=0750
|
2015-09-18 18:45:32 +02:00
|
|
|
tags: [ 'ruby', 'redmine', 'unicorn' ]
|
2015-05-28 11:32:57 +02:00
|
|
|
|
|
|
|
- name: Install the unicorn startup file for redmine
|
|
|
|
copy: src=redmine.init dest=/etc/init.d/redmine owner=root group=root mode=0755
|
|
|
|
when: ruby_use_unicorn
|
2015-09-18 18:45:32 +02:00
|
|
|
tags: [ 'ruby', 'redmine', 'unicorn' ]
|
2015-05-28 11:32:57 +02:00
|
|
|
|
|
|
|
- name: Install the unicorn defaults file
|
|
|
|
template: src=unicorn-redmine.default.j2 dest=/etc/default/unicorn-redmine owner=root group=root mode=0644
|
|
|
|
notify: Reload unicorn when needed
|
2015-09-18 18:45:32 +02:00
|
|
|
tags: [ 'ruby', 'redmine', 'unicorn', 'unicorn_conf' ]
|
2015-05-28 11:32:57 +02:00
|
|
|
|
2015-09-18 18:45:32 +02:00
|
|
|
- name: Install the unicorn logrotate file
|
|
|
|
template: src=unicorn-logrotate.j2 dest=/etc/logrotate.d/unicorn-redmine owner=root group=root mode=0644
|
|
|
|
tags: [ 'ruby', 'redmine', 'unicorn', 'unicorn_conf' ]
|
|
|
|
|
2015-05-28 11:32:57 +02:00
|
|
|
- name: Install the unicorn config
|
|
|
|
template: src=unicorn.conf.rb.j2 dest={{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}/config/unicorn.conf.rb owner=root group=root mode=0644
|
|
|
|
when: ruby_use_unicorn
|
|
|
|
notify: Reload unicorn when needed
|
2015-09-18 18:45:32 +02:00
|
|
|
tags: [ 'ruby', 'redmine', 'unicorn', 'unicorn_conf' ]
|
2015-05-28 11:32:57 +02:00
|
|
|
|
|
|
|
- name: Install the needed apache modules
|
|
|
|
apache2_module: name={{ item }} state=present
|
|
|
|
with_items: unicorn_apache_modules
|
|
|
|
when: ruby_use_unicorn
|
|
|
|
notify: apache2 reload
|
2015-09-18 18:45:32 +02:00
|
|
|
tags: [ 'ruby', 'redmine', 'unicorn' ]
|
2015-05-28 11:32:57 +02:00
|
|
|
|
|
|
|
- name: Ensure that the unicorn service is enabled and running
|
|
|
|
service: name=redmine state=started enabled=yes
|
|
|
|
when: ruby_use_unicorn
|
2015-09-18 18:45:32 +02:00
|
|
|
tags: [ 'ruby', 'redmine', 'unicorn' ]
|