redmine: force xpath < 3.0.0 (for ruby 2.1 support)
This commit is contained in:
parent
ca738edcfa
commit
d9756702f6
5 changed files with 77 additions and 1 deletions
|
@ -6,3 +6,5 @@ puma_max_thread: 4
|
|||
redmine_db_name: "{{ redmine_user }}"
|
||||
redmine_db_host: "localhost"
|
||||
redmine_db_username: "{{ redmine_user }}"
|
||||
redmine_plugins: []
|
||||
redmine_themes: []
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
gem "puma"
|
||||
gem "xpath", "< 3.0.0"
|
||||
|
|
|
@ -211,6 +211,18 @@
|
|||
tags:
|
||||
- redmine
|
||||
|
||||
- name: Install Redmine plugins
|
||||
include: plugins.yml
|
||||
with_items: "{{ redmine_plugins }}"
|
||||
tags:
|
||||
- redmine
|
||||
|
||||
- name: Install Redmine themes
|
||||
include: themes.yml
|
||||
with_items: "{{ redmine_themes }}"
|
||||
tags:
|
||||
- redmine
|
||||
|
||||
- name: Update local gems with bundle
|
||||
bundler:
|
||||
state: present
|
||||
|
@ -218,7 +230,7 @@
|
|||
gem_path: "/home/{{ redmine_user }}/.gems"
|
||||
user_install: yes
|
||||
become_user: "{{ redmine_user }}"
|
||||
when: redmine_git_task.changed or redmine_local_gemfile_task.changed
|
||||
when: redmine_git_task.changed or redmine_local_gemfile_task.changed or redmine_plugin_install.changed
|
||||
|
||||
- name: Migrate database with rake
|
||||
shell: bundle exec rake -qf ~/www/Rakefile db:migrate
|
||||
|
@ -235,6 +247,13 @@
|
|||
become_method: sudo
|
||||
become_flags: '-iu {{ redmine_user }}'
|
||||
|
||||
- name: Migrate plugins
|
||||
shell: bundle exec rake -qf ~/www/Rakefile redmine:plugins:migrate
|
||||
become_user: "{{ redmine_user }}"
|
||||
become_method: sudo
|
||||
become_flags: '-iu {{ redmine_user }}'
|
||||
when: redmine_plugin_install.changed
|
||||
|
||||
- name: Generate secret token
|
||||
shell: bundle exec rake -qf ~/www/Rakefile generate_secret_token
|
||||
args:
|
||||
|
|
28
redmine/tasks/plugins.yml
Normal file
28
redmine/tasks/plugins.yml
Normal file
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
- name: Copy/Update plugin from archive
|
||||
unarchive:
|
||||
src: "{{ item.zip }}"
|
||||
dest: "/home/{{ redmine_user }}/www/plugins/"
|
||||
remote_src: yes
|
||||
owner: "{{ redmine_user }}"
|
||||
group: "{{ redmine_user }}"
|
||||
mode: "0750"
|
||||
register: redmine_plugin_install
|
||||
when: item.zip is defined
|
||||
|
||||
- name: Copy/Update plugin from git repository
|
||||
git:
|
||||
repo: "{{ item.git }}"
|
||||
dest: "/home/{{ redmine_user }}/www/plugins/{{ item.git | basename | splitext | first }}"
|
||||
version: "{{ item.tree | default('master') }}"
|
||||
register: redmine_plugin_install
|
||||
when: item.git is defined
|
||||
|
||||
- name: Fix rights on plugin dir
|
||||
file:
|
||||
path: "/home/{{ redmine_user }}/www/plugins/{{ item.git | basename | splitext | first }}"
|
||||
owner: "{{ redmine_user }}"
|
||||
group: "{{ redmine_user }}"
|
||||
mode: "u=rwX,g=rX,o="
|
||||
recurse: True
|
||||
when: item.git is defined
|
26
redmine/tasks/themes.yml
Normal file
26
redmine/tasks/themes.yml
Normal file
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
- name: Copy/Update theme from archive
|
||||
unarchive:
|
||||
src: "{{ item.zip }}"
|
||||
dest: "/home/{{ redmine_user }}/www/public/themes/"
|
||||
remote_src: yes
|
||||
owner: "{{ redmine_user }}"
|
||||
group: "{{ redmine_user }}"
|
||||
mode: "0750"
|
||||
when: item.zip is defined
|
||||
|
||||
- name: Copy/Update theme from git repository
|
||||
git:
|
||||
repo: "{{ item.git }}"
|
||||
dest: "/home/{{ redmine_user }}/www/public/themes/{{ item.git | basename | splitext | first }}"
|
||||
version: "{{ item.tree | default('master') }}"
|
||||
when: item.git is defined
|
||||
|
||||
- name: Fix rights on theme dir
|
||||
file:
|
||||
path: "/home/{{ redmine_user }}/www/public/themes/{{ item.git | basename | splitext | first }}"
|
||||
owner: "{{ redmine_user }}"
|
||||
group: "{{ redmine_user }}"
|
||||
mode: "0750"
|
||||
recurse: True
|
||||
when: item.git is defined
|
Loading…
Reference in a new issue