From 1d67e721d037c0e42568edfe6421169ae3278f8a Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 9 Feb 2017 12:03:52 +0100 Subject: [PATCH] library/roles/quickrank: Fix the 'become' behaviour so that it works when remote_user is not root. library/roles/smartgears/dataminer_app/tasks/dataminer-app.yml: Fix the 'become' behaviour so that it works when remote_user is not root. --- quickrank/tasks/main.yml | 2 +- smartgears/dataminer_app/tasks/dataminer-app.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/quickrank/tasks/main.yml b/quickrank/tasks/main.yml index 20217a4..1b43aa6 100644 --- a/quickrank/tasks/main.yml +++ b/quickrank/tasks/main.yml @@ -34,7 +34,7 @@ when: ( quickrank_src | changed ) - name: Install the quickrank binaries - become: False + become_user: "{{ d4science_ansible_become_user | default('root') }}" shell: cd /home/{{ d4science_user }}/quickrank/bin ; install -m 755 quicklearn /usr/local/bin when: ( quickrank_src | changed ) diff --git a/smartgears/dataminer_app/tasks/dataminer-app.yml b/smartgears/dataminer_app/tasks/dataminer-app.yml index 491ace7..b495a92 100644 --- a/smartgears/dataminer_app/tasks/dataminer-app.yml +++ b/smartgears/dataminer_app/tasks/dataminer-app.yml @@ -15,7 +15,7 @@ notify: Restart smartgears - name: Install the script that fixes the WPS configuration - become: False + become_user: "{{ d4science_ansible_become_user | default('root') }}" template: src=wps-config-fixer.j2 dest=/usr/local/bin/wps-config-fixer owner=root group=root mode=0555 with_items: '{{ tomcat_m_instances }}'