fhn_manager: fix the upgrade scenario. It still needs some tasks to correctly install and configure the EGI API environment.

This commit is contained in:
Andrea Dell'Amico 2017-09-25 18:14:51 +02:00
parent 0f098c640a
commit e2b6920db9
1 changed files with 17 additions and 7 deletions

View File

@ -2,17 +2,27 @@
- block:
- name: Remove the old fhn-manager files
file: path={{ smartgears_instance_path }}/webapps/{{ fhn_manager_name }} state=absent
when: fhn_manager_upgrade
notify: Restart smartgears
become: True
become_user: '{{ d4science_user }}'
when: not fhn_manager_install
tags: [ 'smartgears', 'fhn_manager', 'tomcat' ]
- block:
# NOTE: Install as the smartgears user so we do not mess with the permissions
- name: Get the fhn-manager-service
maven_artifact: artifact_id={{ fhn_manager_name }} version={{ fhn_manager_version | default(omit) }} group_id={{ fhn_group_id }} extension={{ fhn_extension | default('war') }} repository_url={{ fhn_manager_repository_url }} dest={{ smartgears_user_home }}/{{ fhn_manager_file }}
maven_artifact: artifact_id={{ fhn_manager_name }} version={{ fhn_manager_version | default(omit) }} group_id={{ fhn_group_id }} extension={{ fhn_extension | default('war') }} repository_url={{ fhn_manager_repository_url }} dest={{ smartgears_downloads_dir }}/{{ fhn_manager_file }}
register: fhn_mgr_download
- name: Create the fhn manager working directory
file: path={{ smartgears_instance_path }}/webapps/{{ fhn_manager_name }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }}
- name: Unarchive the fhn_manager war
unarchive: copy=no src={{ smartgears_user_home }}/{{ fhn_manager_file }} dest={{ smartgears_instance_path }}/webapps/{{ fhn_manager_name }} creates={{ smartgears_instance_path }}/webapps/{{ fhn_manager_name }}/WEB-INF/lib
- name: Remove the old fhn-manager files
file: path={{ smartgears_instance_path }}/webapps/{{ fhn_manager_name }} state=absent
when: ( fhn_mgr_download | changed )
notify: Restart smartgears
- name: Copy the fhn_manager war file to its destination place
copy: src={{ smartgears_downloads_dir }}/{{ fhn_manager_file }} dest={{ smartgears_instance_path }}/webapps/{{ fhn_manager_name }}.{{ fhn_extension }} force=yes remote_src=yes
notify: Restart smartgears
become: True