From 9adf0e8194b9fe5d9d75745901f47ebb5b3d16e9 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 3 Nov 2016 16:35:38 +0100 Subject: [PATCH] library/roles/smartgears/smartgears: do not remove the state when upgrading the service. Now to force a state removal the variabile smartgears_remove_state must be set to True. --- smartgears/smartgears/defaults/main.yml | 1 + smartgears/smartgears/tasks/smartgears-app.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/smartgears/smartgears/defaults/main.yml b/smartgears/smartgears/defaults/main.yml index 837c80e6..c2477895 100644 --- a/smartgears/smartgears/defaults/main.yml +++ b/smartgears/smartgears/defaults/main.yml @@ -6,6 +6,7 @@ gcube_repository_stagin_test: 'gcube-staging-test' # distribution version smartgears_upgrade: False smartgears_force_install: False +smartgears_remove_state: False smartgears_node: True smartgears_install_generic_virthost: True diff --git a/smartgears/smartgears/tasks/smartgears-app.yml b/smartgears/smartgears/tasks/smartgears-app.yml index eee6c0b9..44ff30d2 100644 --- a/smartgears/smartgears/tasks/smartgears-app.yml +++ b/smartgears/smartgears/tasks/smartgears-app.yml @@ -89,7 +89,7 @@ - name: Remove the smartgears application state if the configuration changed file: dest={{ smartgears_install_path }}/state state=absent - when: ( containerxml_state | changed ) + when: smartgears_remove_state notify: Restart smartgears tags: [ 'smartgears', 'smartgears_conf', 'tomcat' ]