From 2681e0574de94ba7bcab6e9b9fead19651e77e9f Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Tue, 11 Apr 2017 18:36:45 +0200 Subject: [PATCH] library/roles/smartgears/smart_executor: Refactored to use the maven_artifact module. --- smartgears/smart_executor/defaults/main.yml | 6 ++++-- smartgears/smart_executor/tasks/main.yml | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/smartgears/smart_executor/defaults/main.yml b/smartgears/smart_executor/defaults/main.yml index c82a7fd5..3b210e83 100644 --- a/smartgears/smart_executor/defaults/main.yml +++ b/smartgears/smart_executor/defaults/main.yml @@ -5,6 +5,8 @@ smart_executor_context: /smart-executor smart_executor_version: 1.4.0-4.1.0-132084 smart_executor_name: smart-executor -smart_executor_file: '{{ smart_executor_name }}-{{ smart_executor_version }}.war' -smart_executor_url: 'http://maven.research-infrastructures.eu/nexus/content/repositories/{{ gcube_repository }}/org/gcube/vremanagement/smart-executor/{{ smart_executor_version }}/{{ smart_executor_file }}' +smart_executor_extension: war +smart_executor_group_id: org.gcube.vremanagement +smart_executor_file: '{{ smart_executor_name }}-{{ smart_executor_version }}.{{ smart_executor_extension }}' +smart_executor_url: 'http://maven.research-infrastructures.eu/nexus/content/repositories/{{ gcube_repository }}' diff --git a/smartgears/smart_executor/tasks/main.yml b/smartgears/smart_executor/tasks/main.yml index 81108539..fa351fbb 100644 --- a/smartgears/smart_executor/tasks/main.yml +++ b/smartgears/smart_executor/tasks/main.yml @@ -10,8 +10,8 @@ # NOTE: Install as the smartgears user so we do not mess with the permissions - name: Get the smart executor plugin - get_url: url={{ smart_executor_url }} dest={{ smartgears_user_home }}/{{ smart_executor_file }} - + 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 }} + - name: Create the smart executor working directory file: path={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }}