From f5f52df75e7b5461e5ebb44583fc7a1d9b698736 Mon Sep 17 00:00:00 2001 From: Roberto Date: Thu, 25 Jan 2018 16:27:58 +0100 Subject: [PATCH] ../library/roles/smartgears/sdmx_datasource_service add new role --- .../sdmx_datasource_service/defaults/main.yml | 10 ++++++ .../sdmx_datasource_service/tasks/main.yml | 31 +++++++++++++++++++ .../defaults/main.yml | 2 +- 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 smartgears/sdmx_datasource_service/defaults/main.yml create mode 100644 smartgears/sdmx_datasource_service/tasks/main.yml diff --git a/smartgears/sdmx_datasource_service/defaults/main.yml b/smartgears/sdmx_datasource_service/defaults/main.yml new file mode 100644 index 0000000..e395101 --- /dev/null +++ b/smartgears/sdmx_datasource_service/defaults/main.yml @@ -0,0 +1,10 @@ +--- +sdmx_datasource_service_install: False +sdmx_datasource_service_upgrade: False +sdmx_datasource_service_version: latest +sdmx_datasource_service_name: sdmx-datasource-service + +sdmx_datasource_group_id: org.gcube.data.publishing +sdmx_datasource_extension: war +sdmx_datasource_service_file: '{{ sdmx_datasource_service_name }}-{{ sdmx_datasource_service_version }}.{{ sdmx_datasource_extension }}' + diff --git a/smartgears/sdmx_datasource_service/tasks/main.yml b/smartgears/sdmx_datasource_service/tasks/main.yml new file mode 100644 index 0000000..25a53f0 --- /dev/null +++ b/smartgears/sdmx_datasource_service/tasks/main.yml @@ -0,0 +1,31 @@ +--- +- block: + - name: Remove the old service files + file: path={{ item }} state=absent + with_items: + - '{{ smartgears_instance_path }}/webapps/{{ sdmx_datasource_service_name }}' + - '{{ smartgears_instance_path }}/webapps/{{ sdmx_datasource_service_name }}.{{ sdmx_datasource_extension }}' + + become: True + become_user: '{{ d4science_user }}' + when: not sdmx_datasource_service_install + tags: [ 'smartgears', 'sdmx_datasource_service', 'tomcat' ] + +- block: + - name: Get the sdmx_datasource-service + maven_artifact: artifact_id={{ sdmx_datasource_service_name }} version={{ sdmx_datasource_service_version | default('latest') }} group_id={{ sdmx_datasource_group_id }} extension={{ sdmx_datasource_extension | default('war') }} repository_url={{ smartgears_global_base_url }} dest={{ smartgears_downloads_dir }}/{{ sdmx_datasource_service_file }} + register: sdmx_datasource_service_download + + - name: Remove the old service files + file: path={{ smartgears_instance_path }}/webapps/{{ sdmx_datasource_service_name }} state=absent + when: ( sdmx_datasource_service_download | changed ) + + - name: Copy the service war file into the webapps directory + copy: src={{ smartgears_downloads_dir }}/{{ sdmx_datasource_service_file }} dest={{ smartgears_instance_path }}/webapps/{{ sdmx_datasource_service_name }}.{{ sdmx_datasource_extension }} remote_src=yes force=yes + notify: Restart smartgears + + become: True + become_user: '{{ d4science_user }}' + when: sdmx_datasource_service_install + tags: [ 'smartgears', 'sdmx_datasource_service', 'tomcat' ] + diff --git a/smartgears/social-networking-library-ws/defaults/main.yml b/smartgears/social-networking-library-ws/defaults/main.yml index d9af0a6..75deb14 100644 --- a/smartgears/social-networking-library-ws/defaults/main.yml +++ b/smartgears/social-networking-library-ws/defaults/main.yml @@ -1,6 +1,6 @@ --- social_networking_library_ws_install: False -social_networking_library_ws_version: 2.1.0-4.10.0-152935 +social_networking_library_ws_version: 2.1.1-4.10.0-162415 social_networking_library_ws_name: social-networking-library-ws social_networking_library_ws_group_id: org.gcube.portal social_networking_library_ws_extension: war