Strip path from default ensure_pip_from_upstream_interpreters

The ensure-pip role has an option to provide multiple interpreters to
use. If not specified, we default to ansible_python.executable. This
default includes the full path to the executable. Those manually
providing which interpreters to use will not know what the full path is,
only the versions they would like to use. To make things consistent,
this strips off the path so we just have the version (python, python3,
python3.8, etc).

Change-Id: I339afc08393e9c6b1d26a05cf13b6fdc151f46d5
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
Sean McGinnis 2020-07-10 11:24:27 -05:00
parent 2f9ef55117
commit 09b4be329e
No known key found for this signature in database
GPG Key ID: CE7EE4BFAF8D70C8
1 changed files with 1 additions and 1 deletions

View File

@ -3,4 +3,4 @@ ensure_pip_from_packages_with_python2: '{{ (ansible_python.version.major == 2) |
ensure_pip_from_upstream_url: 'https://bootstrap.pypa.io/get-pip.py'
ensure_pip_from_upstream: False
ensure_pip_from_upstream_interpreters:
- '{{ ansible_python.executable }}'
- '{{ ansible_python.executable | regex_replace(".*python", "python") }}'