From 44c421b5afbd6f5916f2a07114857e5136f15f38 Mon Sep 17 00:00:00 2001 From: Chandan Kumar Date: Tue, 8 Jan 2019 18:09:22 +0530 Subject: [PATCH] Create venv_install_destination_path parent directory Before creating the venv, it is necessary to make sure that the parent directory exists otherwise venv creation will fail. Change-Id: I241e249c919bc52fcc0220737b9d96d9608afebf --- tasks/python_venv_install.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tasks/python_venv_install.yml b/tasks/python_venv_install.yml index ae9dd39..a11fd93 100644 --- a/tasks/python_venv_install.yml +++ b/tasks/python_venv_install.yml @@ -39,6 +39,11 @@ when: - venv_rebuild | bool +- name: Create the venv_install_destination_path parent directory + file: + path: "{{ venv_install_destination_path | dirname }}" + state: directory + # NOTE(odyssey4me): # Not using --always-copy for CentOS/SuSE due to # https://github.com/pypa/virtualenv/issues/565