From 4b2b0fa2bcb865afac3207c2a37dcd2419c687e8 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Fri, 17 Mar 2017 13:17:46 +0100 Subject: [PATCH] library/roles/smartgears/smartgears/tasks/smartgears-app.yml: Add a task to force a restart when a variable has been defined. --- smartgears/smartgears/tasks/smartgears-app.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/smartgears/smartgears/tasks/smartgears-app.yml b/smartgears/smartgears/tasks/smartgears-app.yml index 5f1adf7d..4ba96ea7 100644 --- a/smartgears/smartgears/tasks/smartgears-app.yml +++ b/smartgears/smartgears/tasks/smartgears-app.yml @@ -89,7 +89,8 @@ tags: [ 'smartgears', 'smartgears_conf', 'tomcat' ] - name: Remove the smartgears application state if the configuration changed - file: dest={{ smartgears_install_path }}/state state=absent + #file: dest={{ smartgears_install_path }}/state state=absent + file: dest=/home/gcube/Smartgears/state state=absent when: smartgears_remove_state notify: Restart smartgears tags: [ 'smartgears', 'smartgears_conf', 'tomcat' ] @@ -107,10 +108,14 @@ tags: [ 'smartgears', 'tomcat', 'smartgears_loglevel' ] - name: Remove some wrong symbolic links created by the install/upgrade script - file: dest={{ smartgears_install_path }}/state state=absent + file: dest={{ item }} state=absent with_items: - '{{ smartgears_install_path }}/lib/lib' - '{{ smartgears_install_path }}/apps/webapps' when: smartgears_upgrade tags: [ 'smartgears', 'smartgears_conf', 'tomcat' ] +- name: Forse a smartgears restart + service: name='tomcat-instance-{{ smartgears_http_port }}' state=restarted + when: smartgears_force_restart is defined and smartgears_force_restart + tags: [ 'smartgears', 'smartgears_conf', 'tomcat' ]