From 1f76342ccffb332664994a9ec4bc88a8c0606652 Mon Sep 17 00:00:00 2001 From: Dariusz Smigiel Date: Tue, 1 Feb 2022 06:20:59 -0800 Subject: [PATCH] Pull correct upstream pip version Recent release of pip removed support for Python 3.6 [1] Configure default url for pip, depending on supported Python version. [1]: https://pip.pypa.io/en/stable/news/#v22-0 Change-Id: I01faeba1dff864de31b3bbf9ddbe0a4d454fdbe9 --- roles/ensure-pip/defaults/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/ensure-pip/defaults/main.yaml b/roles/ensure-pip/defaults/main.yaml index f55233b0d..69f0f23ea 100644 --- a/roles/ensure-pip/defaults/main.yaml +++ b/roles/ensure-pip/defaults/main.yaml @@ -1,6 +1,6 @@ ensure_pip_from_packages: True ensure_pip_from_packages_with_python2: '{{ (ansible_python.version.major == 2) | ternary(True, False) }}' -ensure_pip_from_upstream_url: 'https://bootstrap.pypa.io/get-pip.py' +ensure_pip_from_upstream_url: '{{ ansible_python_version is version("3.7", ">=") | ternary("https://bootstrap.pypa.io/get-pip.py", "https://bootstrap.pypa.io/pip/3.6/get-pip.py") }}' ensure_pip_from_upstream: False ensure_pip_from_upstream_interpreters: - '{{ ansible_python.executable | regex_replace(".*python", "python") }}'