added tasks for managing gcubeapp.xml, added verify checksum on maven task

This commit is contained in:
Roberto Cirillo 2019-04-19 15:05:05 +02:00
parent 4f99479ded
commit 4551bda6ee
1 changed files with 11 additions and 3 deletions

View File

@ -14,7 +14,7 @@
- block:
- 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={{ smartgears_global_base_url }} dest={{ smartgears_downloads_dir }}/{{ gcube_oauth_file }}
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 }} verify_checksum=always
register: gcube_oauth_download
- name: Remove the old gcube oauth files
@ -22,8 +22,16 @@
when: gcube_oauth_download is changed
notify: Restart smartgears
- name: Copy the gcube_oauth war into the webapps directory
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
# - name: Copy the gcube_oauth war into the webapps directory
# 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
# notify: Restart smartgears
- name: Create the oauth working directory
file: path={{ smartgears_instance_path }}/webapps/gcube-{{ gcube_oauth_name }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }}
- name: Unarchive the oauth war into the tomcat webapps dir
unarchive: copy=no src={{ smartgears_downloads_dir }}/{{ gcube_oauth_file }} dest={{ smartgears_instance_path }}/webapps/gcube-{{ gcube_oauth_name }} creates='{{ smartgears_instance_path }}/webapps/gcube-{{ gcube_oauth_name }}/WEB-INF/lib'
register: oauth_updated
notify: Restart smartgears
become: True