2016-06-13 16:24:30 +02:00
|
|
|
---
|
2016-07-14 12:40:31 +02:00
|
|
|
- block:
|
2016-09-27 18:06:31 +02:00
|
|
|
- name: Remove the old smart executor files if an upgrade is planned
|
|
|
|
file: path={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }} state=absent
|
|
|
|
when: smartgears_upgrade
|
|
|
|
|
|
|
|
- name: Remove the smart executor files if we want to remove it
|
2016-07-14 12:40:31 +02:00
|
|
|
file: path={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }} state=absent
|
2016-09-27 18:46:23 +02:00
|
|
|
when: remove_smart_executor_install
|
2016-06-13 16:24:30 +02:00
|
|
|
|
2016-07-14 12:40:31 +02:00
|
|
|
# NOTE: Install as the smartgears user so we do not mess with the permissions
|
|
|
|
- name: Get the smart executor plugin
|
2017-04-11 18:36:45 +02:00
|
|
|
maven_artifact: artifact_id={{ smart_executor_name }} version={{ smart_executor_version | default('latest') }} group_id={{ smart_executor_group_id }} extension={{ smart_executor_extension | default('war') }} repository_url={{ smart_executor_url }} dest={{ smartgears_user_home }}/{{ smart_executor_file }}
|
|
|
|
|
2016-07-14 12:40:31 +02:00
|
|
|
- name: Create the smart executor working directory
|
|
|
|
file: path={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }}
|
2016-06-13 16:24:30 +02:00
|
|
|
|
2016-07-14 12:40:31 +02:00
|
|
|
- name: Unarchive the smartexecutor distribution
|
|
|
|
unarchive: copy=no src={{ smartgears_user_home }}/{{ smart_executor_file }} dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }} creates={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib
|
|
|
|
notify: Restart smartgears
|
2016-07-15 19:25:49 +02:00
|
|
|
|
|
|
|
become: True
|
2016-09-27 18:06:31 +02:00
|
|
|
become_user: '{{ smartgears_user }}'
|
|
|
|
when: smart_executor_install
|
2016-07-15 19:23:33 +02:00
|
|
|
tags: [ 'smartgears', 'smart_executor', 'tomcat' ]
|