library/roles/redmine: Ansible 2 compatibility.

This commit is contained in:
Andrea Dell'Amico 2016-04-04 18:00:36 +02:00
parent 1a685e17c8
commit c1c59a9c7b
4 changed files with 11 additions and 39 deletions

View File

@ -1,15 +1,11 @@
---
- name: Load the required apache modules
apache2_module: name={{ item }} state=present
with_items: redmine_base_apache_modules
with_items: '{{ redmine_base_apache_modules }}'
notify: apache2 reload
tags:
- apache
- redmine
tags: [ 'apache', 'redmine' ]
- name: Ensure that the apache ssl directory exists
file: dest=/etc/apache2/ssl state=directory owner=root group=root mode=0750
tags:
- apache
- redmine
tags: [ 'apache', 'redmine' ]

View File

@ -3,46 +3,22 @@
apt_key: id=561F9B9CAC40B2F7 keyserver=keyserver.ubuntu.com state=present
register: update_apt_cache
when: ruby_use_mod_passenger
tags:
- ruby
- redmine
- passenger
tags: [ 'ruby', 'redmine', 'passenger' ]
- name: Install the phusion passenger repo
apt_repository: repo='deb https://oss-binaries.phusionpassenger.com/apt/passenger {{ ansible_distribution_release }} main' state=present
register: update_apt_cache
apt_repository: repo='deb https://oss-binaries.phusionpassenger.com/apt/passenger {{ ansible_distribution_release }} main' state=present update_cache=yes
when: ruby_use_mod_passenger
tags:
- ruby
- redmine
- passenger
- name: Update the apt cache
apt: update_cache=yes
when:
- ruby_use_mod_passenger
- update_apt_cache.changed
ignore_errors: True
tags:
- ruby
- redmine
- passenger
tags: [ 'ruby', 'redmine', 'passenger' ]
- name: Install the apache mod_passenger package
apt: pkg=libapache2-mod-passenger state=present
when: ruby_use_mod_passenger
notify: apache2 reload
tags:
- apache
- redmine
- passenger
tags: [ 'ruby', 'redmine', 'passenger' ]
- name: Install the mod-passenger configuration
apache2_module: name=passenger state=present
when: ruby_use_mod_passenger
notify: apache2 reload
tags:
- apache
- redmine
- passenger
tags: [ 'ruby', 'redmine', 'passenger' ]

View File

@ -1,6 +1,6 @@
---
- name: Fail if the redmine data directory variable is not defined
fail: redmine_glob_root_dir is required for this role
fail: msg="redmine_glob_root_dir is required for this role"
when: redmine_glob_root_dir is not defined
tags: redmine

View File

@ -1,7 +1,7 @@
---
- name: Install the unicorn ruby-on-rails service and its dependencies
gem: name={{ item }} state=latest
with_items: unicorn_gems
with_items: '{{ unicorn_gems }}'
when: ruby_use_unicorn
tags: [ 'ruby', 'redmine', 'unicorn' ]
@ -35,7 +35,7 @@
- name: Install the needed apache modules
apache2_module: name={{ item }} state=present
with_items: unicorn_apache_modules
with_items: '{{ unicorn_apache_modules }}'
when: ruby_use_unicorn
notify: apache2 reload
tags: [ 'ruby', 'redmine', 'unicorn' ]