2017-03-08 14:48:17 +01:00
|
|
|
---
|
|
|
|
- block:
|
|
|
|
- name: Remove the old gcube oauth files
|
2017-09-14 18:25:35 +02:00
|
|
|
file: path={{ item }} state=absent
|
|
|
|
with_items:
|
|
|
|
- '{{ smartgears_instance_path }}/webapps/gcube-{{ gcube_oauth_name }}'
|
|
|
|
- '{{ smartgears_instance_path }}/webapps/gcube-{{ gcube_oauth_name }}.{{ gcube_oauth_extension }}'
|
2017-09-25 18:17:06 +02:00
|
|
|
notify: Restart smartgears
|
2017-03-08 14:48:17 +01:00
|
|
|
|
|
|
|
become: True
|
|
|
|
become_user: '{{ d4science_user }}'
|
2017-09-14 18:16:26 +02:00
|
|
|
when: not gcube_oauth_install
|
2017-03-08 14:48:17 +01:00
|
|
|
tags: [ 'smartgears', 'gcube_oauth', 'tomcat' ]
|
|
|
|
|
|
|
|
- block:
|
|
|
|
- name: Get the gcube-oauth war
|
2017-09-14 18:16:26 +02:00
|
|
|
maven_artifact: artifact_id={{ gcube_oauth_name }} version={{ gcube_oauth_version | default(omit) }} group_id={{ gcube_oauth_group_id }} extension={{ gcube_oauth_extension | default('war') }} repository_url={{ smartgears_global_base_url }} dest={{ smartgears_downloads_dir }}/{{ gcube_oauth_file }}
|
2017-09-25 18:17:06 +02:00
|
|
|
register: gcube_oauth_download
|
|
|
|
|
|
|
|
- name: Remove the old gcube oauth files
|
|
|
|
file: path={{ smartgears_instance_path }}/webapps/gcube-{{ gcube_oauth_name }} state=absent
|
|
|
|
when: ( gcube_oauth_download | changed )
|
|
|
|
notify: Restart smartgears
|
2017-03-08 14:48:17 +01:00
|
|
|
|
2017-09-14 18:16:26 +02:00
|
|
|
- name: Copy the gcube_oauth war into the webapps directory
|
2017-09-14 18:33:51 +02:00
|
|
|
copy: src={{ smartgears_downloads_dir }}/{{ gcube_oauth_file }} dest={{ smartgears_instance_path }}/webapps/gcube-{{ gcube_oauth_name }}.{{ gcube_oauth_extension }} remote_src=yes force=yes
|
2017-03-08 14:48:17 +01:00
|
|
|
notify: Restart smartgears
|
|
|
|
|
|
|
|
become: True
|
|
|
|
become_user: '{{ d4science_user }}'
|
|
|
|
when: gcube_oauth_install
|
|
|
|
tags: [ 'smartgears', 'gcube_oauth', 'tomcat' ]
|