From b8c61d325526569a3c6f7faa77536e48cab8facf Mon Sep 17 00:00:00 2001 From: sebalix Date: Thu, 25 Jan 2018 15:57:38 +0100 Subject: [PATCH] [FIX] 'odoo_install_type: pip', execute 'pip' related tasks as 'odoo_user' (not root) --- tasks/install_pip.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tasks/install_pip.yml b/tasks/install_pip.yml index 9d2ece3..f2c12a6 100644 --- a/tasks/install_pip.yml +++ b/tasks/install_pip.yml @@ -19,17 +19,23 @@ creates: "{{ odoo_pip_venv_path }}" - name: Download the pip requirements file + become: yes + become_user: "{{ odoo_user }}" get_url: url="{{ odoo_pip_requirements_url }}" force=yes dest="/home/{{ odoo_user }}/requirements.txt" - name: Install Odoo dependencies (PyPi) + become: yes + become_user: "{{ odoo_user }}" pip: name: "{{ item }}" virtualenv: "{{ odoo_pip_venv_path }}" with_items: "{{ odoo_pip_dependencies }}" - name: Install Odoo from pip external requirements file + become: yes + become_user: "{{ odoo_user }}" pip: requirements: /home/{{ odoo_user }}/requirements.txt extra_args: --upgrade