mirror of
https://github.com/krislamo/vagrant-easyredmine
synced 2024-11-10 06:50:35 +00:00
72 lines
1.7 KiB
YAML
72 lines
1.7 KiB
YAML
- name: install redmine package depdendencies
|
|
yum: name='{{ item }}'
|
|
sudo: yes
|
|
with_items:
|
|
- unzip
|
|
- rubygems
|
|
- ruby-devel
|
|
- zlib-devel
|
|
- openssl-devel
|
|
- gcc-c++
|
|
- ImageMagick-devel
|
|
- expect # for install_wrapper
|
|
|
|
- name: install bundler, redmine-installer gems
|
|
gem: name='{{ item }}'
|
|
user_install=no
|
|
sudo: yes
|
|
with_items:
|
|
- bundler
|
|
- redmine-installer
|
|
|
|
- name: installer package is present?
|
|
stat: path='{{ installer_package_path }}'
|
|
register: has_installer_package
|
|
sudo: no
|
|
changed_when: false
|
|
|
|
- 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
|
|
|
|
- name: add redmine installation wrapper script
|
|
template: dest='{{ _redmine_install_wrapper }}'
|
|
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
|
|
|
|
- name: make installation directory
|
|
file: path='{{ redmine_root_dir }}'
|
|
state=directory
|
|
owner='{{ redmine_owner }}'
|
|
mode=755
|
|
sudo: yes
|
|
register: mk_redmine_root_dir
|
|
|
|
- name: run redmine installer
|
|
command: '{{ _redmine_install_wrapper }}'
|
|
when: mk_redmine_root_dir|changed and do_redmine_installer == True
|
|
sudo: no
|
|
environment:
|
|
PATH: "{{ ansible_env.PATH }}:~/bin"
|
|
|
|
- copy: dest='/opt/easyredmine/lib/tasks/ebrc_settings.rake'
|
|
src='ebrc_settings.rake'
|
|
sudo: yes
|
|
|
|
- name: Configuring Redmine with eupath preferences
|
|
command: 'rake redmine:ebrc_settings RAILS_ENV=production'
|
|
args:
|
|
chdir: '{{ redmine_root_dir }}'
|
|
sudo: no
|