From cc6a29ce513734a6e240213569f7b7bb10b0802f Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Wed, 5 Oct 2016 17:54:32 +0200 Subject: [PATCH] library/roles/smartgears/smartgears: directly unarchive the distribution without saving the tar file locally. --- smartgears/dataminer_app/tasks/dataminer-app.yml | 2 +- smartgears/smartgears/tasks/smartgears-app.yml | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/smartgears/dataminer_app/tasks/dataminer-app.yml b/smartgears/dataminer_app/tasks/dataminer-app.yml index 0a047ce7..ee34f405 100644 --- a/smartgears/dataminer_app/tasks/dataminer-app.yml +++ b/smartgears/dataminer_app/tasks/dataminer-app.yml @@ -1,7 +1,7 @@ --- - block: - name: Get and unpack the dataminer application - unarchive: src={{ dataminer_zip_url }} dest={{ smartgears_instance_path }}/webapps copy=no + unarchive: src={{ dataminer_zip_url }} dest={{ smartgears_instance_path }}/webapps copy=no creates={{ smartgears_instance_path }}/webapps/wps/config/wps_config.xml notify: Restart smartgears - name: Create a directory where to install the gebco_08.nc data file diff --git a/smartgears/smartgears/tasks/smartgears-app.yml b/smartgears/smartgears/tasks/smartgears-app.yml index b52e32af..eee6c0b9 100644 --- a/smartgears/smartgears/tasks/smartgears-app.yml +++ b/smartgears/smartgears/tasks/smartgears-app.yml @@ -7,16 +7,11 @@ when: smartgears_force_install tags: [ 'smartgears', 'tomcat' ] -- name: Get the smartgears distribution - get_url: url={{ smartgears_url }} dest={{ smartgears_user_home }}/{{ smartgears_file }} - register: new_smartgears_distribution - tags: [ 'smartgears', 'tomcat' ] - - name: Unarchive the smartgears distribution become: True become_user: '{{ smartgears_user }}' - unarchive: copy=no src={{ smartgears_user_home }}/{{ smartgears_file }} dest={{ smartgears_user_home }} creates={{ smartgears_user_home }}/smartgears-distribution-{{ smartgears_distribution_version }} - when: ( new_smartgears_distribution | changed ) + unarchive: copy=no src={{ smartgears_url }} dest={{ smartgears_user_home }} creates={{ smartgears_user_home }}/smartgears-distribution-{{ smartgears_distribution_version }} + register: new_smartgears_distribution tags: [ 'smartgears', 'tomcat' ] - name: Stop the smartgears container before launching the upgrade script