forked from ISTI-ansible-roles/ansible-roles
47 lines
2.1 KiB
YAML
47 lines
2.1 KiB
YAML
---
|
|
- block:
|
|
- name: Remove the installed home library connector before upgrading
|
|
file: dest={{ item }} state=absent
|
|
with_items:
|
|
- '{{ smartgears_instance_path }}/webapps/{{ home_library_name }}'
|
|
- '{{ smartgears_instance_path }}/webapps/{{ home_library_name }}.war'
|
|
when: home_library_upgrade
|
|
|
|
- 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_user_home }}/{{ home_library_file }}
|
|
|
|
- name: Create the home library working directory
|
|
file: path={{ smartgears_instance_path }}/webapps/{{ home_library_name }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }}
|
|
|
|
- name: Unarchive the home library war
|
|
unarchive: copy=no src={{ smartgears_user_home }}/{{ home_library_file }} dest={{ smartgears_instance_path }}/webapps/{{ home_library_name }}
|
|
args:
|
|
creates: '{{ smartgears_instance_path }}/webapps/{{ home_library_name }}/WEB-INF/lib'
|
|
notify: Restart smartgears
|
|
|
|
- name: Create the JackRabbit persistence directory
|
|
become_user: root
|
|
file: dest={{ jackrabbit_data_dir }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }}
|
|
|
|
- name: Install the repository configuration files
|
|
template: src={{ item }}.j2 dest={{ jackrabbit_data_dir }}/{{ item }}
|
|
with_items: '{{ jackrabbit_config_files }}'
|
|
notify: Restart smartgears
|
|
|
|
become: True
|
|
become_user: '{{ smartgears_user }}'
|
|
when: home_library_install
|
|
tags: [ 'smartgears', 'home_library', 'tomcat' ]
|
|
|
|
|
|
- block:
|
|
- name: Remove the installed home library whe we do not want it installed
|
|
file: dest={{ item }} state=absent
|
|
with_items:
|
|
- '{{ smartgears_instance_path }}/webapps/{{ home_library_name }}'
|
|
- '{{ smartgears_instance_path }}/webapps/{{ home_library_name }}.war'
|
|
|
|
become: True
|
|
become_user: '{{ smartgears_user }}'
|
|
when: not home_library_install
|
|
tags: [ 'smartgears', 'home_library', 'tomcat' ]
|