Role to install the uri-resolver. Configure the playbook to install it on data1-p.d4science.org
This commit is contained in:
parent
1bbe4f4de4
commit
3b83553f9e
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
smartgears_uri_resolver_install: False
|
||||
uri_resolver_ver: latest
|
||||
uri_resolver_group_id: org.gcube.data.transfer
|
||||
uri_resolver_name: uri-resolver
|
||||
uri_resolver_extension: war
|
||||
uri_resolver_file: '{{ uri_resolver_name }}-{{ uri_resolver_ver }}.{{ uri_resolver_extension }}'
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
grsf_api_install: False
|
||||
grsf_api_ver: latest
|
||||
grsf_api_group_id: gr.forth.ics.isl
|
||||
grsf_api_name: grsf-api
|
||||
grsf_api_extension: war
|
||||
grsf_api_file: '{{ grsf_api_name }}-{{ grsf_api_ver }}.{{ grsf_api_extension }}'
|
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
- block:
|
||||
- name: Remove the old uri-resolver files
|
||||
file: path={{ item }} state=absent
|
||||
with_items:
|
||||
- '{{ smartgears_instance_path }}/webapps/{{ uri_resolver_name }}'
|
||||
- '{{ smartgears_instance_path }}/webapps/{{ uri_resolver_name }}.{{ uri_resolver_extension }}'
|
||||
notify: Restart smartgears
|
||||
|
||||
become: True
|
||||
become_user: '{{ d4science_user }}'
|
||||
tags: [ 'smartgears', 'uri_resolver', 'tomcat' ]
|
||||
when: not smartgears_uri_resolver_install
|
||||
|
||||
- block:
|
||||
- name: Get the uri-resolver war
|
||||
maven_artifact: artifact_id={{ uri_resolver_name }} version={{ uri_resolver_version | default(omit) }} group_id={{ uri_resolver_group_id }} extension={{ uri_resolver_extension | default('war') }} repository_url={{ smartgears_global_base_url }} dest={{ smartgears_downloads_dir }}/{{ uri_resolver_file }} verify_checksum=always
|
||||
register: uri_resolver_download
|
||||
|
||||
- name: Remove the old uri-resolver files
|
||||
file: path={{ smartgears_instance_path }}/webapps/{{ uri_resolver_name }} state=absent
|
||||
notify: Restart smartgears
|
||||
when: uri_resolver_download is changed
|
||||
|
||||
- name: Copy the uri-resolver war file into the webapps directory
|
||||
copy: src={{ smartgears_downloads_dir }}/{{ uri_resolver_file }} dest={{ smartgears_instance_path }}/webapps/{{ uri_resolver_name }}.{{ uri_resolver_extension }} remote_src=yes force=yes
|
||||
notify: Restart smartgears
|
||||
|
||||
become: True
|
||||
become_user: '{{ d4science_user }}'
|
||||
tags: [ 'smartgears', 'uri_resolver', 'tomcat' ]
|
||||
when: smartgears_uri_resolver_install
|
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
- block:
|
||||
- name: Remove the old grsf-api files
|
||||
file: path={{ item }} state=absent
|
||||
with_items:
|
||||
- '{{ smartgears_instance_path }}/webapps/{{ uri_resolver_name }}'
|
||||
- '{{ smartgears_instance_path }}/webapps/{{ uri_resolver_name }}.{{ uri_resolver_extension }}'
|
||||
notify: Restart smartgears
|
||||
|
||||
become: True
|
||||
become_user: '{{ d4science_user }}'
|
||||
tags: [ 'smartgears', 'uri_resolver', 'tomcat' ]
|
||||
when: not uri_resolver_install
|
||||
|
||||
- block:
|
||||
- name: Get the grsf-api war
|
||||
maven_artifact: artifact_id={{ uri_resolver_name }} version={{ uri_resolver_version | default(omit) }} group_id={{ uri_resolver_group_id }} extension={{ uri_resolver_extension | default('war') }} repository_url={{ smartgears_global_base_url }} dest={{ smartgears_downloads_dir }}/{{ uri_resolver_file }}
|
||||
register: uri_resolver_download
|
||||
|
||||
- name: Remove the old grsf-api files
|
||||
file: path={{ smartgears_instance_path }}/webapps/{{ uri_resolver_name }} state=absent
|
||||
notify: Restart smartgears
|
||||
when: uri_resolver_download is changed
|
||||
|
||||
- name: Copy the GRSF api war file into the webapps directory
|
||||
copy: src={{ smartgears_downloads_dir }}/{{ uri_resolver_file }} dest={{ smartgears_instance_path }}/webapps/{{ uri_resolver_name }}.{{ uri_resolver_extension }} remote_src=yes force=yes
|
||||
notify: Restart smartgears
|
||||
|
||||
become: True
|
||||
become_user: '{{ d4science_user }}'
|
||||
tags: [ 'smartgears', 'uri_resolver', 'tomcat' ]
|
||||
when: uri_resolver_install
|
Loading…
Reference in New Issue