From da6a90513ae9e802f1e525c377ff02b5ca286e8b Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 14 Sep 2017 18:27:30 +0200 Subject: [PATCH] accounting-service: Manage the app removal. --- smartgears/accounting-service/tasks/main.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/smartgears/accounting-service/tasks/main.yml b/smartgears/accounting-service/tasks/main.yml index 5deb3f24..eec661f0 100644 --- a/smartgears/accounting-service/tasks/main.yml +++ b/smartgears/accounting-service/tasks/main.yml @@ -1,4 +1,16 @@ --- +- block: + - name: Remove the accounting service app + file: dest={{ item }} state=absent + with_items: + - '{{ smartgears_instance_path }}/webapps/{{ accounting_service_name }}' + - '{{ smartgears_instance_path }}/webapps/{{ accounting_service_name }}.{{ accounting_service_extension }}' + + become: True + become_user: '{{ smartgears_user }}' + when: not accounting_service_install + tags: [ 'smartgears', 'accounting_service', 'tomcat' ] + - block: - name: Get the accounting_service war maven_artifact: artifact_id={{ accounting_service_name }} version={{ accounting_service_version | default('latest') }} group_id={{ accounting_service_group_id }} extension={{ accounting_service_extension | default('war') }} repository_url={{ smartgears_global_base_url }} dest={{ smartgears_downloads_dir }}/{{ accounting_service_file }}