forked from ISTI-ansible-roles/ansible-roles
accounting-service: fix the upgrade scenario.
This commit is contained in:
parent
2c733203fd
commit
fbca3de150
|
@ -5,6 +5,7 @@
|
||||||
with_items:
|
with_items:
|
||||||
- '{{ smartgears_instance_path }}/webapps/{{ accounting_service_name }}'
|
- '{{ smartgears_instance_path }}/webapps/{{ accounting_service_name }}'
|
||||||
- '{{ smartgears_instance_path }}/webapps/{{ accounting_service_name }}.{{ accounting_service_extension }}'
|
- '{{ smartgears_instance_path }}/webapps/{{ accounting_service_name }}.{{ accounting_service_extension }}'
|
||||||
|
notify: Restart smartgears
|
||||||
|
|
||||||
become: True
|
become: True
|
||||||
become_user: '{{ smartgears_user }}'
|
become_user: '{{ smartgears_user }}'
|
||||||
|
@ -14,7 +15,12 @@
|
||||||
- block:
|
- block:
|
||||||
- name: Get the accounting_service war
|
- 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 }}
|
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_download
|
||||||
|
|
||||||
|
- name: Remove the accounting service app
|
||||||
|
file: dest={{ smartgears_instance_path }}/webapps/{{ accounting_service_name }} state=absent
|
||||||
|
when: ( accounting_download | changed )
|
||||||
|
|
||||||
- name: Copy the accounting_service war file to the destination place
|
- 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
|
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
|
notify: Restart smartgears
|
||||||
|
|
Loading…
Reference in New Issue