From ff54c3654cdf8341403cd1efb4dc70a68a4ce1a7 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 29 Sep 2016 18:45:00 +0200 Subject: [PATCH] library/roles/smartgears/resource_registry: Add a variable to manage the resource registry upgrade. --- smartgears/resource_registry/defaults/main.yml | 1 + smartgears/resource_registry/tasks/main.yml | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/smartgears/resource_registry/defaults/main.yml b/smartgears/resource_registry/defaults/main.yml index 5dacdb34..33dee13c 100644 --- a/smartgears/resource_registry/defaults/main.yml +++ b/smartgears/resource_registry/defaults/main.yml @@ -1,5 +1,6 @@ --- resource_registry_install: False +resource_registry_upgrade: False resource_registry_gcube_repository: gcube-snapshots resource_registry_snapshot_ver: 1.1.0-SNAPSHOT resource_registry_version: 1.1.0-20160929.151332-7 diff --git a/smartgears/resource_registry/tasks/main.yml b/smartgears/resource_registry/tasks/main.yml index 5934782a..74835254 100644 --- a/smartgears/resource_registry/tasks/main.yml +++ b/smartgears/resource_registry/tasks/main.yml @@ -3,11 +3,11 @@ - name: Remove the old smart executor files if present file: path={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }} state=absent - when: ( not smart_executor_install ) or ( smartgears_upgrade ) + when: resource_registry_upgrade - name: Remove the old resource-registry files file: path={{ smartgears_instance_path }}/webapps/{{ resource_registry_name }} state=absent - when: ( not resource_registry_install ) or ( smartgears_upgrade ) + when: resource_registry_upgrade # NOTE: Install as the smartgears user so we do not mess with the permissions - name: Get the resource-registry-service