2015-11-18 23:02:49 +00:00
|
|
|
- name: install redmine package depdendencies
|
|
|
|
yum: name='{{ item }}'
|
2015-11-12 04:14:03 +00:00
|
|
|
sudo: yes
|
|
|
|
with_items:
|
|
|
|
- unzip
|
|
|
|
- rubygems
|
|
|
|
- ruby-devel
|
|
|
|
- zlib-devel
|
|
|
|
- openssl-devel
|
|
|
|
- gcc-c++
|
|
|
|
- ImageMagick-devel
|
|
|
|
- expect # for install_wrapper
|
|
|
|
|
2015-11-18 23:02:49 +00:00
|
|
|
- name: install bundler, redmine-installer gems
|
|
|
|
gem: name='{{ item }}'
|
|
|
|
user_install=no
|
2015-11-12 04:14:03 +00:00
|
|
|
sudo: yes
|
|
|
|
with_items:
|
|
|
|
- bundler
|
|
|
|
- redmine-installer
|
|
|
|
|
2015-11-22 02:47:57 +00:00
|
|
|
- name: installer package is present?
|
|
|
|
stat: path='{{ installer_package_path }}'
|
2015-11-12 04:14:03 +00:00
|
|
|
register: has_installer_package
|
|
|
|
sudo: no
|
2015-11-22 02:47:57 +00:00
|
|
|
changed_when: false
|
2015-11-12 04:14:03 +00:00
|
|
|
|
|
|
|
- name: download installer
|
|
|
|
get_url: url='{{ installer_package_url }}'
|
|
|
|
dest='{{ cache_dir }}'
|
|
|
|
mode=0640
|
|
|
|
force=no
|
|
|
|
when: has_installer_package.stat.exists == False
|
|
|
|
sudo: no
|
|
|
|
|
2015-11-22 02:47:57 +00:00
|
|
|
- name: add redmine installation wrapper script
|
|
|
|
template: dest='{{ _redmine_install_wrapper }}'
|
2015-11-12 04:14:03 +00:00
|
|
|
src=install_wrapper.j2
|
|
|
|
mode=750
|
|
|
|
sudo: no
|
|
|
|
|
|
|
|
- name: delete contents of redmine root directory
|
|
|
|
file: path='{{ redmine_root_dir }}'
|
|
|
|
state=absent
|
|
|
|
sudo: yes
|
|
|
|
when: redmine_db_created|changed
|
|
|
|
|
2015-11-22 02:47:57 +00:00
|
|
|
- name: make installation directory
|
|
|
|
file: path='{{ redmine_root_dir }}'
|
2015-11-12 04:14:03 +00:00
|
|
|
state=directory
|
2015-11-22 02:47:57 +00:00
|
|
|
owner='{{ redmine_owner }}'
|
2015-11-12 04:14:03 +00:00
|
|
|
mode=755
|
|
|
|
sudo: yes
|
|
|
|
register: mk_redmine_root_dir
|
|
|
|
|
|
|
|
- name: run redmine installer
|
|
|
|
command: '{{ _redmine_install_wrapper }}'
|
2015-11-18 23:02:49 +00:00
|
|
|
when: mk_redmine_root_dir|changed and do_redmine_installer == True
|
2015-11-12 04:14:03 +00:00
|
|
|
sudo: no
|
2015-11-18 23:02:49 +00:00
|
|
|
environment:
|
|
|
|
PATH: "{{ ansible_env.PATH }}:~/bin"
|