moved grsf_publisher_ws from gcube role to smartgears role

add quota service roles
update smartgears-node* files
This commit is contained in:
Roberto Cirillo 2017-02-24 15:58:41 +01:00
parent 1c7b6b4fa9
commit 5e24ea56ab
5 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,9 @@
---
quota_service_install: False
quota_service_version: latest
quota_service_name: quota-manager
quota_group_id: org.gcube.resource.management
quota_extension: war
quota_service_file: '{{ quota_service_name }}-{{ quota_service_version }}.{{ quota_extension }}'
quota_service_repository_url: 'http://maven.research-infrastructures.eu/nexus/content/repositories/{{ gcube_repository }}'

View File

@ -0,0 +1,26 @@
---
- block:
- name: Remove the old quota service files
file: path={{ smartgears_instance_path }}/webapps/{{ quota_service_name }} state=absent
become: True
become_user: '{{ d4science_user }}'
when: ( not quota_service_install ) or ( smartgears_upgrade )
tags: [ 'smartgears', 'quota_service', 'tomcat' ]
- block:
# NOTE: Install as the smartgears user so we do not mess with the permissions
- name: Get the quota-service war
maven_artifact: artifact_id={{ quota_service_name }} version={{ quota_service_version | default(omit) }} group_id={{ quota_group_id }} extension={{ quota_extension | default('war') }} repository_url={{ quota_service_repository_url }} dest={{ smartgears_user_home }}/{{ quota_service_file }}
- name: Create the quota manager working directory
file: path={{ smartgears_instance_path }}/webapps/{{ quota_service_name }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }}
- name: Unarchive the quota_service war
unarchive: copy=no src={{ smartgears_user_home }}/{{ quota_service_file }} dest={{ smartgears_instance_path }}/webapps/{{ quota_service_name }} creates={{ smartgears_instance_path }}/webapps/{{ quota_service_name }}/WEB-INF/lib
notify: Restart smartgears
become: True
become_user: '{{ d4science_user }}'
when: quota_service_install
tags: [ 'smartgears', 'quota_service', 'tomcat' ]