Add a task to install the omnioauth plugin and install ruby 2.3 from a PPA on Ubuntu Trusty.

This commit is contained in:
Andrea Dell'Amico 2019-04-03 20:05:11 +02:00
parent bdbd6aa4dd
commit 2748d5cc25
5 changed files with 45 additions and 16 deletions

View File

@ -15,6 +15,10 @@ redmine_inst_dir: redmine
redmine_user: redmine
redmine_group: '{{ redmine_user }}'
# Ubuntu 14.04: install ruby from a ppa to get a newer version
redmine_trusty_ruby_repo: 'ppa:brightbox/ruby-ng'
trusty_ruby_version: 2.3
redmine_sysvinit_service_name: '{{ redmine_inst_name }}'
redmine_systemd_service_name: 'unicorn@{{ redmine_inst_name }}.service'
redmine_service_name: '{{ redmine_systemd_service_name }}'
@ -84,6 +88,7 @@ ruby_use_mod_passenger: False
ruby_use_unicorn: True
# Redmine 2.x only
rm_involvement_plugin: False
rm_omniauth_plugin: False
# Used by unicorn
unicorn_listen_port: 4000
@ -107,6 +112,22 @@ unicorn_apache_modules:
# For Ubuntu trusty
redmine_base_packages:
- subversion
- git-core
- curl
- 'ruby{{ trusty_ruby_version }}'
- rails
- ruby-rmagick
- 'ruby{{ trusty_ruby_version }}-dev'
- rails
- zlib1g-dev
- libpq-dev
- libmysqld-dev
- libmagickwand-dev
- libmagickcore-dev
- imagemagick
redmine_bionic_packages:
- subversion
- git-core
- curl
@ -122,8 +143,6 @@ redmine_base_packages:
- libmagickcore-dev
- imagemagick
redmine_bionic_packages: '{{ redmine_base_packages }}'
# For Ubuntu precise
redmine_base_packages_old_gems:
- subversion

View File

@ -1,7 +1,18 @@
---
- name: Install the packages needed to run the redmine infrastructure. install the ruby packages needed to run redmine. Use ruby 2.0
apt: pkg={{ redmine_base_packages }} state=present
tags:
- ruby
- redmine
- block:
- name: Install a PPA on trusty to get a newer version of ruby
apt_repository: repo={{ redmine_trusty_ruby_repo }} state=present update_cache=yes
- name: Install the packages needed to run the redmine infrastructure. install the ruby packages needed to run redmine, Ubuntu Trusty
apt: pkg={{ redmine_base_packages }} state=present cache_valid_time=1800
when: is_trusty
tags: [ 'ruby', 'redmine' ]
- block:
- name: Install the packages needed to run the redmine infrastructure. install the ruby packages needed to run redmine, Ubuntu Bionic
apt: pkg={{ redmine_bionic_packages }} state=present cache_valid_time=1800
when: is_trusty
tags: [ 'ruby', 'redmine' ]

View File

@ -1,8 +1,5 @@
---
- import_tasks: base-packages.yml
when: is_trusty
- import_tasks: system-packages.yml
when: is_bionic
- import_tasks: rubygems.yml
- import_tasks: redmine.yml
- import_tasks: redmine-plugins.yml

View File

@ -324,3 +324,11 @@
notify:
- Bundle install and reconfigure redmine
tags: [ 'redmine', 'redmine_plugins', 'redmine_plugins_involvement_filter' ]
- name: Install the omniauth Oauth plugin
git: repo=https://github.com/arlin2050/redmine_omniauth_client.git dest={{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}/plugins/redmine_omniauth_client update=no
notify:
- Bundle install and reconfigure redmine
when: rm_omniauth_plugin
tags: [ 'redmine', 'redmine_plugins', 'rm_oauth', 'rm_omniauth' ]

View File

@ -1,6 +0,0 @@
---
- name: Install the packages needed to run the redmine infrastructure.
apt: pkg={{ redmine_bionic_packages }} state=present cache_valid_time=1800
tags: [ 'ruby', 'redmine' ]