From 11a1944cfdc1d297e124b512d32d3072510b7fc5 Mon Sep 17 00:00:00 2001 From: stephane Date: Tue, 23 Feb 2016 13:46:10 -0800 Subject: [PATCH] Fixing virtualenv issues A couple of issues relating to virtualenv arose while testing on Ubuntu 15.10. Adjust the virtualenv setting in the pip install phase to work correctly and simplify the check and install of virtualenv so we get the right package. Change-Id: I09fb604ec6667aa45c3c2063adf3d760114aa65a --- playbooks/roles/bifrost-ironic-install/tasks/pip_install.yml | 2 +- scripts/env-setup.sh | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/playbooks/roles/bifrost-ironic-install/tasks/pip_install.yml b/playbooks/roles/bifrost-ironic-install/tasks/pip_install.yml index 99c988d62..e498f3e52 100644 --- a/playbooks/roles/bifrost-ironic-install/tasks/pip_install.yml +++ b/playbooks/roles/bifrost-ironic-install/tasks/pip_install.yml @@ -18,7 +18,7 @@ name: "{{ package }}" state: "{{ state | default(omit) }}" version: "{{ version | default(omit) }}" - virtualenv: "{{ bifrost_venv_dir if enable_venv else 'undefined' }}" + virtualenv: "{{ bifrost_venv_dir if enable_venv else omit }}" when: source_install is not defined or source_install == false # NOTE (cinerama): We should be able to use the pip module here and # possibly merge these two tasks when diff --git a/scripts/env-setup.sh b/scripts/env-setup.sh index d749a13c5..7d40aab5f 100755 --- a/scripts/env-setup.sh +++ b/scripts/env-setup.sh @@ -30,9 +30,7 @@ if [ -x '/usr/bin/apt-get' ]; then fi if [ -n "${VENV-}" ]; then if ! $(virtualenv --version &>/dev/null); then - if $(sudo -H apt-get -y install virtualenv); then - sudo -H apt-get -y install python-virtualenv - fi + sudo -H apt-get -y install python-virtualenv fi fi elif [ -x '/usr/bin/yum' ]; then