forked from ISTI-ansible-roles/ansible-roles
Fix the social-networking-library-ws role. See https://support.d4science.org/issues/9688
This commit is contained in:
parent
11f5be1a83
commit
7378e765f1
|
@ -1,10 +1,8 @@
|
|||
---
|
||||
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_group_id: org.gcube.portal
|
||||
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_repository_url: 'http://maven.research-infrastructures.eu/nexus/content/repositories/{{ gcube_repository }}'
|
||||
|
||||
|
|
|
@ -1,23 +1,22 @@
|
|||
---
|
||||
- block:
|
||||
- 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_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' ]
|
||||
|
||||
- block:
|
||||
# NOTE: Install as the smartgears user so we do not mess with the permissions
|
||||
- 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
|
||||
file: path={{ smartgears_instance_path }}/webapps/{{ social_networking_library_ws_name }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }}
|
||||
|
||||
- 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
|
||||
- name: Copy the social_networking_library_ws war into the tomcat webapps dir
|
||||
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
|
||||
notify: Restart smartgears
|
||||
|
||||
become: True
|
||||
|
|
Loading…
Reference in New Issue