From 0fdbc7dba88d0cca92b17684ade3fda6cc924d8f Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Wed, 13 Sep 2017 19:41:07 +0200 Subject: [PATCH] Accounting service: more optimization to the role tasks. --- smartgears/accounting-service/defaults/main.yml | 1 - smartgears/accounting-service/tasks/main.yml | 13 ++----------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/smartgears/accounting-service/defaults/main.yml b/smartgears/accounting-service/defaults/main.yml index 32d39f55..a00792dd 100644 --- a/smartgears/accounting-service/defaults/main.yml +++ b/smartgears/accounting-service/defaults/main.yml @@ -1,6 +1,5 @@ --- accounting_service_install: False -accounting_service_upgrade: False accounting_service_version: 1.0.0-4.5.0-148495 accounting_service_name: accounting-service accounting_service_extension: war diff --git a/smartgears/accounting-service/tasks/main.yml b/smartgears/accounting-service/tasks/main.yml index c423b274..5deb3f24 100644 --- a/smartgears/accounting-service/tasks/main.yml +++ b/smartgears/accounting-service/tasks/main.yml @@ -2,18 +2,9 @@ - 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 }} - register: accounting_service_new_war - - - name: Remove the old accounting-service files - file: path={{ smartgears_instance_path }}/webapps/{{ accounting_service_name }} state=absent - when: (accounting_service_new_war | changed) - - - name: Create the accounting-service working directory - file: path={{ smartgears_instance_path }}/webapps/{{ accounting_service_name }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }} - when: (accounting_service_new_war | changed) - - name: Unarchive the accounting service war - unarchive: copy=no src={{ smartgears_downloads_dir }}/{{ accounting_service_file }} dest={{ smartgears_instance_path }}/webapps/{{ accounting_service_name }} creates={{ smartgears_instance_path }}/webapps/{{ accounting_service_name }}/WEB-INF/lib + - name: Copy the accounting_service war file to the destination place + copy: src={{ smartgears_downloads_dir }}/{{ accounting_service_file }} dest={{ smartgears_instance_path }}/webapps/{{ accounting_service_name }}.{{ accounting_service_extension }} remote_src=yes force=yes notify: Restart smartgears become: True