From 5141cd866a15c907a0fd1adeb27ea9f0a2b28001 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 20 Oct 2016 17:09:13 +0200 Subject: [PATCH] library/roles/gcube/authorization_service/tasks/main.yml: Use the unarchive remote feature to download and unpack the authorization war file in one single task. --- gcube/authorization_service/tasks/main.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/gcube/authorization_service/tasks/main.yml b/gcube/authorization_service/tasks/main.yml index 5c332072..42518db5 100644 --- a/gcube/authorization_service/tasks/main.yml +++ b/gcube/authorization_service/tasks/main.yml @@ -11,11 +11,19 @@ - '{{ auth_instance_path }}/webapps/authorization-service.war' when: authorization_service_upgrade or not authorization_service_install - - name: Get the authorization service war file - get_url: url={{ authorization_service_url }} dest={{ auth_instance_path }}/webapps/{{ authorization_service_file }} + # - name: Get the authorization service war file + # get_url: url={{ authorization_service_url }} dest={{ auth_instance_path }}/webapps/{{ authorization_service_file }} - - name: Unpack the authorization service war file - shell: mkdir {{ auth_instance_path }}/webapps/authorization-service ; cd {{ auth_instance_path }}/webapps/authorization-service ; jar xf {{ auth_instance_path }}/webapps/{{ authorization_service_file }} + # - name: Unpack the authorization service war file + # shell: mkdir {{ auth_instance_path }}/webapps/authorization-service ; cd {{ auth_instance_path }}/webapps/authorization-service ; jar xf {{ auth_instance_path }}/webapps/{{ authorization_service_file }} + # args: + # creates: '{{ auth_instance_path }}/webapps/authorization-service/WEB-INF/AuthorizationConfiguration.xml' + + - name: Create the authorization service webapp directory + file: dest={{ auth_instance_path }}/webapps/authorization-service state=directory + + - name: Get and unpack the authorization war file + unarchive: copy=no src={{ authorization_service_url }} dest={{ auth_instance_path }}/webapps/authorization-service args: creates: '{{ auth_instance_path }}/webapps/authorization-service/WEB-INF/AuthorizationConfiguration.xml'