2017-03-31 23:09:48 +02:00
|
|
|
---
|
2017-09-14 18:27:30 +02:00
|
|
|
- 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 }}'
|
2017-09-25 16:47:23 +02:00
|
|
|
notify: Restart smartgears
|
2017-09-14 18:27:30 +02:00
|
|
|
|
|
|
|
become: True
|
|
|
|
become_user: '{{ smartgears_user }}'
|
|
|
|
when: not accounting_service_install
|
|
|
|
tags: [ 'smartgears', 'accounting_service', 'tomcat' ]
|
|
|
|
|
2017-03-31 23:09:48 +02:00
|
|
|
- block:
|
2017-06-12 17:46:09 +02:00
|
|
|
- name: Get the accounting_service war
|
2017-09-13 18:41:39 +02:00
|
|
|
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 }}
|
2017-09-25 16:47:23 +02:00
|
|
|
register: accounting_download
|
2017-09-13 18:41:39 +02:00
|
|
|
|
2017-12-19 15:32:36 +01:00
|
|
|
- name: Remove the old accounting service app
|
2017-09-25 16:47:23 +02:00
|
|
|
file: dest={{ smartgears_instance_path }}/webapps/{{ accounting_service_name }} state=absent
|
|
|
|
when: ( accounting_download | changed )
|
|
|
|
|
2018-01-17 16:44:23 +01:00
|
|
|
- name: Remove the accounting service library
|
2018-01-19 16:14:10 +01:00
|
|
|
shell: rm -fr {{ smartgears_instance_path }}/lib/{{ accounting_service_library_name }}-*
|
2018-01-17 16:44:23 +01:00
|
|
|
when: ( accounting_download | changed )
|
|
|
|
|
|
|
|
- name: Remove the accounting couchbase library if present
|
2018-01-19 16:14:10 +01:00
|
|
|
shell: rm -fr {{ smartgears_instance_path }}/lib/{{ accounting_couchbase_library_name }}-*
|
2018-01-17 16:44:23 +01:00
|
|
|
when: ( accounting_download | changed )
|
|
|
|
|
|
|
|
- name: Get the couchbase library
|
|
|
|
maven_artifact: artifact_id={{ accounting_couchbase_library_name }} version={{ accounting_couchbase_library_version | default('latest') }} group_id={{ accounting_couchbase_library_group_id }} extension={{ accounting_couchbase_library_extension | default('war') }} repository_url={{ smartgears_global_base_url }} classifier={{ accounting_service_library_classifier }} dest={{ smartgears_instance_path }}/lib
|
|
|
|
when: ( accounting_download | changed )
|
|
|
|
|
2017-09-13 19:41:07 +02:00
|
|
|
- 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
|
2017-06-12 17:46:09 +02:00
|
|
|
notify: Restart smartgears
|
2017-03-31 23:09:48 +02:00
|
|
|
|
|
|
|
become: True
|
|
|
|
become_user: '{{ smartgears_user }}'
|
|
|
|
when: accounting_service_install
|
|
|
|
tags: [ 'smartgears', 'accounting_service', 'tomcat' ]
|