Fix the social-networking-library-ws role. See https://support.d4science.org/issues/9688

This commit is contained in:
Andrea Dell'Amico 2017-09-14 17:05:14 +02:00
parent 11f5be1a83
commit 7378e765f1
2 changed files with 9 additions and 12 deletions

View File

@ -1,10 +1,8 @@
--- ---
social_networking_library_ws_install: False social_networking_library_ws_install: False
social_networking_library_ws_version: 2.1.0-4.6.1-152935 social_networking_library_ws_version: latest
#social_networking_library_ws_version: latest
social_networking_library_ws_name: social-networking-library-ws social_networking_library_ws_name: social-networking-library-ws
social_networking_library_ws_group_id: org.gcube.portal social_networking_library_ws_group_id: org.gcube.portal
social_networking_library_ws_extension: war social_networking_library_ws_extension: war
social_networking_library_ws_file: '{{ social_networking_library_ws_name }}-{{ social_networking_library_ws_version }}.{{ social_networking_library_ws_extension }}' social_networking_library_ws_file: '{{ social_networking_library_ws_name }}-{{ social_networking_library_ws_version }}.{{ social_networking_library_ws_extension }}'
social_networking_library_ws_repository_url: 'http://maven.research-infrastructures.eu/nexus/content/repositories/{{ gcube_repository }}'

View File

@ -1,23 +1,22 @@
--- ---
- block: - block:
- name: Remove the old social-networking-library-ws files - name: Remove the old social-networking-library-ws files
file: path={{ smartgears_instance_path }}/webapps/{{ social_networking_library_ws_name }} state=absent file: path={{ item }} state=absent
with_items:
- '{{ smartgears_instance_path }}/webapps/{{ social_networking_library_ws_name }}'
- '{{ smartgears_instance_path }}/webapps/{{ social_networking_library_ws_name }}.{{ social_networking_library_ws_extension }}'
become: True become: True
become_user: '{{ d4science_user }}' become_user: '{{ d4science_user }}'
when: ( not social_networking_library_ws_install ) or ( smartgears_upgrade ) when: not social_networking_library_ws_install
tags: [ 'smartgears', 'social_networking_library_ws', 'tomcat' ] tags: [ 'smartgears', 'social_networking_library_ws', 'tomcat' ]
- block: - block:
# NOTE: Install as the smartgears user so we do not mess with the permissions
- name: Get the social-networking-library-ws war - name: Get the social-networking-library-ws war
maven_artifact: artifact_id={{ social_networking_library_ws_name }} version={{ social_networking_library_ws_version | default(omit) }} group_id={{ social_networking_library_ws_group_id }} extension={{ social_networking_library_ws_extension | default('war') }} repository_url={{ social_networking_library_ws_repository_url }} dest={{ smartgears_user_home }}/{{ social_networking_library_ws_file }} maven_artifact: artifact_id={{ social_networking_library_ws_name }} version={{ social_networking_library_ws_version | default(omit) }} group_id={{ social_networking_library_ws_group_id }} extension={{ social_networking_library_ws_extension | default('war') }} repository_url={{ smartgears_global_base_url }} dest={{ smartgears_downloads_dir }}/{{ social_networking_library_ws_file }}
- name: Create the data trasfer working directory - name: Copy the social_networking_library_ws war into the tomcat webapps dir
file: path={{ smartgears_instance_path }}/webapps/{{ social_networking_library_ws_name }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }} copy: src={{ smartgears_downloads_dir }}/{{ social_networking_library_ws_file }} dest={{ smartgears_instance_path }}/webapps/{{ social_networking_library_ws_name }}.{{ social_networking_library_ws_extension }} remote_src=yes force=yes
- name: Unarchive the social_networking_library_ws war
unarchive: copy=no src={{ smartgears_user_home }}/{{ social_networking_library_ws_file }} dest={{ smartgears_instance_path }}/webapps/{{ social_networking_library_ws_name }} creates={{ smartgears_instance_path }}/webapps/{{ social_networking_library_ws_name }}/WEB-INF/lib
notify: Restart smartgears notify: Restart smartgears
become: True become: True