ensure-tox: use ensure-pip role
Use the ensure-pip role to ensure that `pip` is available. If the existing flag `tox_prefer_python2` is set, we pass along the flag to ensure-pip to install Python 2 pip as well. Story: #2007386 Task: #39308 Change-Id: I5053e315df8d2ea9892911800c88afcbe31cc05b
This commit is contained in:
parent
3fc3083456
commit
8f06e1a536
@ -20,3 +20,8 @@ a valid ``tox``.
|
|||||||
|
|
||||||
If tox is not detected, prefer to install tox inside Python 2
|
If tox is not detected, prefer to install tox inside Python 2
|
||||||
instead of Python 3.
|
instead of Python 3.
|
||||||
|
|
||||||
|
If set,
|
||||||
|
:zuul:rolevar:`ensure-pip.ensure_pip_from_packages_with_python2`
|
||||||
|
will be automatically set to `True` to enable a Python 2
|
||||||
|
installation of `pip`.
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
- name: Install pip
|
||||||
|
include_role:
|
||||||
|
name: ensure-pip
|
||||||
|
vars:
|
||||||
|
ensure_pip_from_packages_with_python2: '{{ tox_prefer_python2 }}'
|
||||||
|
|
||||||
- name: Ensure tox is installed
|
- name: Ensure tox is installed
|
||||||
shell: |
|
shell: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
pip:
|
pip:
|
||||||
name: tox
|
name: tox
|
||||||
virtualenv: "{{ ansible_user_dir }}/tox-venv"
|
virtualenv: "{{ ansible_user_dir }}/tox-venv"
|
||||||
|
virtualenv_command: "{{ ensure_pip_virtualenv_command }}"
|
||||||
- name: Run ensure-tox pointing to an already installed tox
|
- name: Run ensure-tox pointing to an already installed tox
|
||||||
include_role:
|
include_role:
|
||||||
name: ensure-tox
|
name: ensure-tox
|
||||||
|
Loading…
Reference in New Issue
Block a user