From 0089a2f9056b21d5393716eaf1822ef8dd51d6fc Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Wed, 17 Jun 2020 10:35:00 +1000 Subject: [PATCH] ensure-pip: remove Xenial venv workaround This was introduced with Id8347b6b09735659a7ed9bbe7f9d2798fbec9620, but is no longer necessary as the OpenDev images don't ship with pip-and-virtualenv. Remove to avoid any ongoing confusion. Change-Id: I87c4d949c9d9602dfa39023b337fa593f8fafde0 --- roles/ensure-pip/tasks/main.yaml | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/roles/ensure-pip/tasks/main.yaml b/roles/ensure-pip/tasks/main.yaml index e4393643a..06374e01d 100644 --- a/roles/ensure-pip/tasks/main.yaml +++ b/roles/ensure-pip/tasks/main.yaml @@ -76,24 +76,3 @@ set_fact: ensure_pip_virtualenv_command: '{{ ensure_pip_virtualenv_command | default(_host_virtualenv) }}' cacheable: true - -# NOTE(ianw): "python3 -m venv" is broken on Xenial images with -# pip-and-virtualenv because the pip is too old to handle our mirrors. -# We can't easily install our backport version because that element -# has put all the packages on hold. In this case, export -# ensure_pip_virtualenv_command as virtualenv until we have got rid of -# this element. -- name: Xenial override - when: ansible_distribution_release == 'xenial' - block: - - - name: Check if we have pip-and-virtualenv - command: grep -q 'pip-and-virtualenv' /etc/dib-manifests/dib_environment - failed_when: false - register: _pip_check - become: yes - - - name: Override virtualenv - set_fact: - ensure_pip_virtualenv_command: '/usr/local/bin/virtualenv -p python3' - when: _pip_check.rc == 0