From e201856f79e372d798a88a5b0e90fcfddbb5693a Mon Sep 17 00:00:00 2001
From: Andrea Dell'Amico <adellam@isti.cnr.it>
Date: Fri, 15 Jul 2016 19:25:49 +0200
Subject: [PATCH] library/roles/smartgears/smart_executor/tasks/main.yml: Run
 the tasks as gcube user.

---
 smartgears/smart_executor/tasks/main.yml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/smartgears/smart_executor/tasks/main.yml b/smartgears/smart_executor/tasks/main.yml
index fc7bb5e..99d359a 100644
--- a/smartgears/smart_executor/tasks/main.yml
+++ b/smartgears/smart_executor/tasks/main.yml
@@ -18,5 +18,7 @@
       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
       when: smart_executor_install
       notify: Restart smartgears
-  
+
+  become: True
+  become_user: '{{ d4science_user }}'
   tags: [ 'smartgears', 'smart_executor', 'tomcat' ]