diff --git a/smartgears/accounting-service/defaults/main.yml b/smartgears/accounting-service/defaults/main.yml new file mode 100644 index 00000000..c75b3667 --- /dev/null +++ b/smartgears/accounting-service/defaults/main.yml @@ -0,0 +1,10 @@ +--- + +accounting_service_gcube_repository: 'gcube-snapshots' +accounting_service_install: False +accounting_service_ver: 1.0.0-20170323.102652-1 +accounting_service_snap: 1.0.0-SNAPSHOT +accounting_service_name: accounting-service +accounting_service_filename: '{{ accounting_service_name }}-{{ accounting_service_ver }}.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_snap}}/{{ accounting_service_filename }}' +accounting_service_war_file: '{{ accounting_service_name }}.war' diff --git a/smartgears/accounting-service/tasks/main.yml b/smartgears/accounting-service/tasks/main.yml new file mode 100644 index 00000000..e76436b4 --- /dev/null +++ b/smartgears/accounting-service/tasks/main.yml @@ -0,0 +1,17 @@ +--- +- block: + + - name: Remove the installed accounting-service before upgrading + file: dest={{ item }} state=absent + with_items: + - '{{ smartgears_instance_path }}/webapps/accounting-service' + - '{{ smartgears_instance_path }}/webapps/accounting-service.war' + when: smartgears_upgrade + + - name: Get the accounting-service war file + get_url: url={{ accounting_service_url }} dest={{ smartgears_instance_path }}/webapps/{{ accounting_service_war_file }} + + become: True + become_user: '{{ smartgears_user }}' + when: accounting_service_install + tags: [ 'smartgears', 'accounting_service', 'tomcat' ]