Merge "ensure-pip: Clarify situation with ensure_pip_from_packages_with_python2"

This commit is contained in:
Zuul 2020-08-26 23:14:22 +00:00 committed by Gerrit Code Review
commit 4d3b20b351
2 changed files with 12 additions and 10 deletions

View File

@ -19,18 +19,21 @@ This role will also install ``wheel`` components sufficient to run
.. zuul:rolevar:: ensure_pip_from_packages .. zuul:rolevar:: ensure_pip_from_packages
:default: True :default: True
Ensure the system packages for pip with the running Install the distribution packages for Python 3 pip, setuptools and
``ansible_python_interpreter`` are installed. wheel on the system.
.. zuul:rolevar:: ensure_pip_from_packages_with_python2 .. zuul:rolevar:: ensure_pip_from_packages_with_python2
:default: False :default: False
Also ensure Python 2 pip is available. This is for backwards Install the distribution packages for Python 2 pip, setuptools and
compatability with platforms that have wheel packages. This defaults to ``True`` when Ansible is running
``ansible_python_interpreter`` as Python 3 but may run some jobs under Python 2.
that still require Python 2 libraries. Note that this may bring in
the Python 2 interpreter environment, which may not be desirable or CentOS 7 requies the ``epel`` repository if this flag is enabled
even available on many platforms. because ``python-pip`` packages come from there.
This may not be valid on distributions that have removed Python 2
support.
.. zuul:rolevar:: ensure_pip_from_upstream .. zuul:rolevar:: ensure_pip_from_upstream
:default: False :default: False

View File

@ -32,5 +32,4 @@
state: present state: present
enablerepo: epel enablerepo: epel
become: yes become: yes
when: ensure_pip_from_packages_with_python2 or when: ensure_pip_from_packages_with_python2
ansible_python.version.major == 2