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.

This commit is contained in:
Andrea Dell'Amico 2016-10-20 17:09:13 +02:00
parent a0e170b79d
commit 5141cd866a
1 changed files with 12 additions and 4 deletions

View File

@ -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'