From 4551bda6ee289d644e7ca028daea114bffb33c7f Mon Sep 17 00:00:00 2001 From: Roberto Cirillo Date: Fri, 19 Apr 2019 15:05:05 +0200 Subject: [PATCH] added tasks for managing gcubeapp.xml, added verify checksum on maven task --- smartgears/gcube-oauth/tasks/main.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/smartgears/gcube-oauth/tasks/main.yml b/smartgears/gcube-oauth/tasks/main.yml index fb26252a..d7f95243 100644 --- a/smartgears/gcube-oauth/tasks/main.yml +++ b/smartgears/gcube-oauth/tasks/main.yml @@ -14,7 +14,7 @@ - block: - name: Get the gcube-oauth war - maven_artifact: artifact_id={{ gcube_oauth_name }} version={{ gcube_oauth_version | default(omit) }} group_id={{ gcube_oauth_group_id }} extension={{ gcube_oauth_extension | default('war') }} repository_url={{ smartgears_global_base_url }} dest={{ smartgears_downloads_dir }}/{{ gcube_oauth_file }} + maven_artifact: artifact_id={{ gcube_oauth_name }} version={{ gcube_oauth_version | default(omit) }} group_id={{ gcube_oauth_group_id }} extension={{ gcube_oauth_extension | default('war') }} repository_url={{ smartgears_global_base_url }} dest={{ smartgears_downloads_dir }}/{{ gcube_oauth_file }} verify_checksum=always register: gcube_oauth_download - name: Remove the old gcube oauth files @@ -22,8 +22,16 @@ when: gcube_oauth_download is changed notify: Restart smartgears - - name: Copy the gcube_oauth war into the webapps directory - copy: src={{ smartgears_downloads_dir }}/{{ gcube_oauth_file }} dest={{ smartgears_instance_path }}/webapps/gcube-{{ gcube_oauth_name }}.{{ gcube_oauth_extension }} remote_src=yes force=yes +# - name: Copy the gcube_oauth war into the webapps directory +# copy: src={{ smartgears_downloads_dir }}/{{ gcube_oauth_file }} dest={{ smartgears_instance_path }}/webapps/gcube-{{ gcube_oauth_name }}.{{ gcube_oauth_extension }} remote_src=yes force=yes +# notify: Restart smartgears + + - name: Create the oauth working directory + file: path={{ smartgears_instance_path }}/webapps/gcube-{{ gcube_oauth_name }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }} + + - name: Unarchive the oauth war into the tomcat webapps dir + unarchive: copy=no src={{ smartgears_downloads_dir }}/{{ gcube_oauth_file }} dest={{ smartgears_instance_path }}/webapps/gcube-{{ gcube_oauth_name }} creates='{{ smartgears_instance_path }}/webapps/gcube-{{ gcube_oauth_name }}/WEB-INF/lib' + register: oauth_updated notify: Restart smartgears become: True