2017-03-30 19:13:22 +02:00
|
|
|
---
|
|
|
|
- block:
|
2017-09-25 18:56:46 +02:00
|
|
|
- name: Remove the installed home library whe we do not want it installed
|
2017-03-30 19:13:22 +02:00
|
|
|
file: dest={{ item }} state=absent
|
|
|
|
with_items:
|
2017-06-23 13:39:30 +02:00
|
|
|
- '{{ smartgears_instance_path }}/webapps/{{ home_library_name }}'
|
|
|
|
- '{{ smartgears_instance_path }}/webapps/{{ home_library_name }}.war'
|
2017-09-25 18:56:46 +02:00
|
|
|
notify: Restart smartgears
|
2017-03-30 19:13:22 +02:00
|
|
|
|
2017-09-25 18:56:46 +02:00
|
|
|
become: True
|
|
|
|
become_user: '{{ smartgears_user }}'
|
|
|
|
when: not home_library_install
|
|
|
|
tags: [ 'smartgears', 'home_library', 'tomcat' ]
|
2017-03-30 19:13:22 +02:00
|
|
|
|
2017-09-25 18:56:46 +02:00
|
|
|
- block:
|
|
|
|
- maven_artifact: artifact_id={{ home_library_name }} version={{ home_library_version | default(omit) }} group_id={{ home_library_group_id }} extension={{ home_library_extension | default('war') }} repository_url={{ smartgears_global_base_url }} dest={{ smartgears_downloads_dir }}/{{ home_library_file }}
|
|
|
|
register: home_library_download
|
|
|
|
|
|
|
|
- name: Remove the installed home library before upgrading
|
|
|
|
file: dest={{ smartgears_instance_path }}/webapps/{{ home_library_name }} state=absent
|
|
|
|
when: ( home_library_download | changed )
|
|
|
|
notify: Restart smartgears
|
2017-06-23 13:39:30 +02:00
|
|
|
|
2017-09-25 18:56:46 +02:00
|
|
|
- name: Copy the home library war
|
|
|
|
copy: src={{ smartgears_downloads_dir }}/{{ home_library_file }} dest={{ smartgears_instance_path }}/webapps/{{ home_library_name }}.{{ home_library_extension | default('war') }} remote_src=yes force=yes
|
2017-06-23 13:39:30 +02:00
|
|
|
notify: Restart smartgears
|
|
|
|
|
2017-07-25 20:40:17 +02:00
|
|
|
- name: Create the JackRabbit persistence directory
|
|
|
|
become_user: root
|
|
|
|
file: dest={{ jackrabbit_data_dir }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }}
|
|
|
|
|
2017-09-29 18:17:03 +02:00
|
|
|
- name: Verify if the JackRabbit persistence directory is in the place where the service expects it
|
|
|
|
stat: path={{ smartgears_instance_path }}/jackrabbit
|
|
|
|
register: jackrabbit_data_path
|
|
|
|
|
|
|
|
- name: Link the data dir to the place where jackrabbit expects it
|
|
|
|
file: src={{ jackrabbit_data_dir }} dest={{ smartgears_instance_path }}/jackrabbit state=link
|
|
|
|
when: not jackrabbit_data_path.exists
|
|
|
|
|
2017-07-25 20:40:17 +02:00
|
|
|
- name: Install the repository configuration files
|
|
|
|
template: src={{ item }}.j2 dest={{ jackrabbit_data_dir }}/{{ item }}
|
|
|
|
with_items: '{{ jackrabbit_config_files }}'
|
|
|
|
notify: Restart smartgears
|
|
|
|
|
2017-03-30 19:13:22 +02:00
|
|
|
become: True
|
|
|
|
become_user: '{{ smartgears_user }}'
|
|
|
|
when: home_library_install
|
|
|
|
tags: [ 'smartgears', 'home_library', 'tomcat' ]
|
2017-06-23 13:39:30 +02:00
|
|
|
|