forked from ISTI-ansible-roles/ansible-roles
library/roles/smartgears/accounting-service: Converto the accounting-service role to maven_artifact.
This commit is contained in:
parent
a990b8f6a8
commit
dfcc84773c
|
@ -1,10 +1,8 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
accounting_service_gcube_repository: 'gcube-staging'
|
|
||||||
accounting_service_install: False
|
accounting_service_install: False
|
||||||
accounting_service_ver: 1.0.0-4.5.0-148495
|
accounting_service_upgrade: False
|
||||||
accounting_service_snap: 1.0.0-SNAPSHOT
|
accounting_service_version: 1.0.0-4.5.0-148495
|
||||||
accounting_service_name: accounting-service
|
accounting_service_name: accounting-service
|
||||||
accounting_service_filename: '{{ accounting_service_name }}-{{ accounting_service_ver }}.war'
|
accounting_service_extension: war
|
||||||
accounting_service_url: 'http://maven.research-infrastructures.eu/nexus/service/local/repositories/{{ accounting_service_gcube_repository }}/content/org/gcube/data/publishing/{{ accounting_service_name }}/{{ accounting_service_ver}}/{{ accounting_service_filename }}'
|
accounting_service_file: '{{ accounting_service_name }}-{{ accounting_service_version }}.{{ accounting_service_extension }}'
|
||||||
accounting_service_war_file: '{{ accounting_service_name }}.war'
|
accounting_service_group_id: org.gcube.data.publishing
|
||||||
|
|
|
@ -1,15 +1,18 @@
|
||||||
---
|
---
|
||||||
- block:
|
- block:
|
||||||
|
- name: Remove the old accounting-service files
|
||||||
|
file: path={{ smartgears_instance_path }}/webapps/{{ accounting_service_name }} state=absent
|
||||||
|
when: accounting_service_upgrade
|
||||||
|
|
||||||
- name: Remove the installed accounting-service before upgrading
|
- name: Create the accounting-service working directory
|
||||||
file: dest={{ item }} state=absent
|
file: path={{ smartgears_instance_path }}/webapps/{{ accounting_service_name }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }}
|
||||||
with_items:
|
|
||||||
- '{{ smartgears_instance_path }}/webapps/accounting-service'
|
- name: Get the accounting_service war
|
||||||
- '{{ smartgears_instance_path }}/webapps/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_user_home }}/{{ accounting_service_file }}
|
||||||
when: smartgears_upgrade
|
|
||||||
|
|
||||||
- name: Get the accounting-service war file
|
- name: Unarchive the accounting service war
|
||||||
get_url: url={{ accounting_service_url }} dest={{ smartgears_instance_path }}/webapps/{{ accounting_service_war_file }}
|
unarchive: copy=no src={{ smartgears_user_home }}/{{ accounting_service_file }} dest={{ smartgears_instance_path }}/webapps/{{ accounting_service_name }} creates={{ smartgears_instance_path }}/webapps/{{ accounting_service_name }}/WEB-INF/lib
|
||||||
|
notify: Restart smartgears
|
||||||
|
|
||||||
become: True
|
become: True
|
||||||
become_user: '{{ smartgears_user }}'
|
become_user: '{{ smartgears_user }}'
|
||||||
|
|
Loading…
Reference in New Issue