dm_pool_manager: Fix the upgrade scenario.

This commit is contained in:
Andrea Dell'Amico 2017-09-25 18:07:42 +02:00
parent 213a21898d
commit 0f098c640a
1 changed files with 7 additions and 0 deletions

View File

@ -5,6 +5,7 @@
with_items: with_items:
- '{{ smartgears_instance_path }}/webapps/{{ dm_pool_manager_name }}' - '{{ smartgears_instance_path }}/webapps/{{ dm_pool_manager_name }}'
- '{{ smartgears_instance_path }}/webapps/{{ dm_pool_manager_name }}.{{ dm_pool_manager_extension }}' - '{{ smartgears_instance_path }}/webapps/{{ dm_pool_manager_name }}.{{ dm_pool_manager_extension }}'
notify: Restart smartgears
become: True become: True
become_user: '{{ d4science_user }}' become_user: '{{ d4science_user }}'
@ -14,12 +15,18 @@
- block: - block:
- name: Get the dm_pool_manager - name: Get the dm_pool_manager
maven_artifact: artifact_id={{ dm_pool_manager_name }} version={{ dm_pool_manager_version | default(omit) }} group_id={{ dm_pool_manager_group_id }} extension={{ dm_pool_manager_extension | default('war') }} repository_url={{ smartgears_global_base_url }} dest={{ smartgears_downloads_dir }}/{{ dm_pool_manager_file }} maven_artifact: artifact_id={{ dm_pool_manager_name }} version={{ dm_pool_manager_version | default(omit) }} group_id={{ dm_pool_manager_group_id }} extension={{ dm_pool_manager_extension | default('war') }} repository_url={{ smartgears_global_base_url }} dest={{ smartgears_downloads_dir }}/{{ dm_pool_manager_file }}
register: dm_pool_manager_download
- name: Remove the old dm_pool_manager files
file: path={{ smartgears_instance_path }}/webapps/{{ dm_pool_manager_name }} state=absent
when: ( dm_pool_manager_download | changed )
- name: Create the dm_pool_manager working directory - name: Create the dm_pool_manager working directory
file: path={{ smartgears_instance_path }}/webapps/{{ dm_pool_manager_name }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }} file: path={{ smartgears_instance_path }}/webapps/{{ dm_pool_manager_name }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }}
- name: Unarchive the dm_pool_manager war - name: Unarchive the dm_pool_manager war
unarchive: copy=no src={{ smartgears_downloads_dir }}/{{ dm_pool_manager_file }} dest={{ smartgears_instance_path }}/webapps/{{ dm_pool_manager_name }} creates={{ smartgears_instance_path }}/webapps/{{ dm_pool_manager_name }}/WEB-INF/lib unarchive: copy=no src={{ smartgears_downloads_dir }}/{{ dm_pool_manager_file }} dest={{ smartgears_instance_path }}/webapps/{{ dm_pool_manager_name }} creates={{ smartgears_instance_path }}/webapps/{{ dm_pool_manager_name }}/WEB-INF/lib
notify: Restart smartgears
- name: Install the dm-pool-manager web.xml template - name: Install the dm-pool-manager web.xml template
template: src=web.xml.j2 dest={{ smartgears_instance_path }}/webapps/dataminer-pool-manager/WEB-INF/web.xml mode=0440 template: src=web.xml.j2 dest={{ smartgears_instance_path }}/webapps/dataminer-pool-manager/WEB-INF/web.xml mode=0440