From d38c0147f03c557ac3de027bee95c8e21f71519a Mon Sep 17 00:00:00 2001
From: Andrea Dell'Amico <adellam@isti.cnr.it>
Date: Fri, 18 Nov 2016 11:17:37 +0100
Subject: [PATCH] library/roles/smartgears/resource_registry/tasks/main.yml:
 Unarchive directly the URL.

---
 smartgears/resource_registry/tasks/main.yml | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/smartgears/resource_registry/tasks/main.yml b/smartgears/resource_registry/tasks/main.yml
index 74835254..b74061ad 100644
--- a/smartgears/resource_registry/tasks/main.yml
+++ b/smartgears/resource_registry/tasks/main.yml
@@ -1,23 +1,20 @@
 ---
 - block:
 
-    - name: Remove the old smart executor files if present
-      file: path={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }} state=absent
-      when: resource_registry_upgrade
-
     - name: Remove the old resource-registry files
       file: path={{ smartgears_instance_path }}/webapps/{{ resource_registry_name }} state=absent
       when: resource_registry_upgrade
 
-    # NOTE: Install as the smartgears user so we do not mess with the permissions
-    - name: Get the resource-registry-service 
-      get_url: url={{ resource_registry_url }} dest={{ smartgears_user_home }}/{{ resource_registry_file }}
+    # # NOTE: Install as the smartgears user so we do not mess with the permissions
+    # - name: Get the resource-registry-service 
+    #   get_url: url={{ resource_registry_url }} dest={{ smartgears_user_home }}/{{ resource_registry_file }}
   
     - name: Create the resource-registry working directory
       file: path={{ smartgears_instance_path }}/webapps/{{ resource_registry_name }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }}
   
     - name: Unarchive the resource_registry war
-      unarchive: copy=no src={{ smartgears_user_home }}/{{ resource_registry_file }} dest={{ smartgears_instance_path }}/webapps/{{ resource_registry_name }} creates={{ smartgears_instance_path }}/webapps/{{ resource_registry_name }}/WEB-INF/lib
+#      unarchive: copy=no src={{ smartgears_user_home }}/{{ resource_registry_file }} dest={{ smartgears_instance_path }}/webapps/{{ resource_registry_name }} creates={{ smartgears_instance_path }}/webapps/{{ resource_registry_name }}/WEB-INF/lib
+      unarchive: copy=no src={{ resource_registry_url }} dest={{ smartgears_instance_path }}/webapps/{{ resource_registry_name }} creates={{ smartgears_instance_path }}/webapps/{{ resource_registry_name }}/WEB-INF/lib
       notify: Restart smartgears
 
     - name: Install the resource registry configuration