diff --git a/redmine/defaults/main.yml b/redmine/defaults/main.yml index 107ac522..7c7d4988 100644 --- a/redmine/defaults/main.yml +++ b/redmine/defaults/main.yml @@ -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 diff --git a/redmine/tasks/base-packages.yml b/redmine/tasks/base-packages.yml index 4120b9b3..025bb202 100644 --- a/redmine/tasks/base-packages.yml +++ b/redmine/tasks/base-packages.yml @@ -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' ] diff --git a/redmine/tasks/main.yml b/redmine/tasks/main.yml index 582a90ea..109741b6 100644 --- a/redmine/tasks/main.yml +++ b/redmine/tasks/main.yml @@ -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 diff --git a/redmine/tasks/redmine-plugins.yml b/redmine/tasks/redmine-plugins.yml index 58813136..52406763 100644 --- a/redmine/tasks/redmine-plugins.yml +++ b/redmine/tasks/redmine-plugins.yml @@ -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' ] + diff --git a/redmine/tasks/system-packages.yml b/redmine/tasks/system-packages.yml deleted file mode 100644 index 2003c21b..00000000 --- a/redmine/tasks/system-packages.yml +++ /dev/null @@ -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' ] - -