diff --git a/smartgears/gcubeapp-setup/tasks/main.yml b/smartgears/gcubeapp-setup/tasks/main.yml index 7a54d3d5..96c37070 100644 --- a/smartgears/gcubeapp-setup/tasks/main.yml +++ b/smartgears/gcubeapp-setup/tasks/main.yml @@ -13,3 +13,17 @@ when: gcubehandlers_setup tags: [ 'smartgears', 'gcubeapp' ] +- name: Remove the gcube-app.xml file when it is not needed + file: dest={{ item.webapp_path | default('/home/gcube/tomcat') }}/webapps/{{ item.webapp_context }}/WEB-INF/gcube-app.xml owner={{ smartgears_user }} group={{ smartgears_user }} state=absent + with_items: '{{ gcubeapp_webapps | default([]) }}' + notify: Restart smartgears + when: not gcubeapp_setup + tags: [ 'smartgears', 'gcubeapp' ] + +- name: Remove the gcube-handlers.xml file when it is not needed + file: dest={{ item.webapp_path | default('/home/gcube/tomcat') }}/webapps/{{ item.webapp_context }}/WEB-INF/gcube-handlers.xml owner={{ smartgears_user }} group={{ smartgears_user }} state=absent + with_items: '{{ gcubeapp_webapps | default([]) }}' + notify: Restart smartgears + when: not gcubehandlers_setup + tags: [ 'smartgears', 'gcubeapp' ] +