forked from ISTI-ansible-roles/ansible-roles
library/roles/smartgears: Role that installs the gcube oauth service.
This commit is contained in:
parent
b56a2549e5
commit
226ccb0130
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
gcube_oauth_install: False
|
||||
gcube_oauth_version: 1.0.0-4.3.0-142179
|
||||
gcube_oauth_name: oauth
|
||||
gcube_oauth_group_id: org.gcube.portal
|
||||
gcube_oauth_extension: war
|
||||
gcube_oauth_file: '{{ gcube_oauth_name }}-{{ gcube_oauth_version }}.{{ gcube_oauth_extension }}'
|
||||
gcube_oauth_repository_url: 'http://maven.research-infrastructures.eu/nexus/content/repositories/{{ gcube_repository }}'
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
- block:
|
||||
- name: Remove the old gcube oauth files
|
||||
file: path={{ smartgears_instance_path }}/webapps/{{ gcube_oauth_name }} state=absent
|
||||
|
||||
become: True
|
||||
become_user: '{{ d4science_user }}'
|
||||
when: ( not gcube_oauth_install ) or ( smartgears_upgrade )
|
||||
tags: [ 'smartgears', 'gcube_oauth', 'tomcat' ]
|
||||
|
||||
- block:
|
||||
# NOTE: Install as the smartgears user so we do not mess with the permissions
|
||||
- name: Get the gcube-oauth war
|
||||
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={{ gcube_oauth_repository_url }} dest={{ smartgears_user_home }}/{{ gcube_oauth_file }}
|
||||
|
||||
- name: Create the data trasfer working directory
|
||||
file: path={{ smartgears_instance_path }}/webapps/gcube-{{ gcube_oauth_name }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }}
|
||||
|
||||
- name: Unarchive the gcube_oauth war
|
||||
unarchive: copy=no src={{ smartgears_user_home }}/{{ gcube_oauth_file }} dest={{ smartgears_instance_path }}/webapps/gcube-{{ gcube_oauth_name }} creates={{ smartgears_instance_path }}/webapps/{{ gcube_oauth_name }}/WEB-INF/lib
|
||||
notify: Restart smartgears
|
||||
|
||||
become: True
|
||||
become_user: '{{ d4science_user }}'
|
||||
when: gcube_oauth_install
|
||||
tags: [ 'smartgears', 'gcube_oauth', 'tomcat' ]
|
Loading…
Reference in New Issue