Accounting service: more optimization to the role tasks.

This commit is contained in:
Andrea Dell'Amico 2017-09-13 19:41:07 +02:00
parent 99d0a519ff
commit 0fdbc7dba8
2 changed files with 2 additions and 12 deletions

View File

@ -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

View File

@ -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