This is pretty trivial, but consistency is probably better in this regard and it does guide you to writing a sentence that is human parsable, which is the point of it. Change-Id: Iaab9bb6aec0ad0f1d3cae10364c1f1b37d02801e
Ensure virtualenv is available
This role installs the requirements for the virtualenv
command on the current distribution.
Users should be aware of some portability issues when using
virtualenv:
- Distributions differ on the interpreter that
virtualenvis provided by, so by callingvirtualenvwith no other arguments means that on some platforms you will get a Python 2 environment and others a Python 3 environment. - If you wish to call
virtualenvas a module (e.g.python -m virtualenv) you will need to know which interpreter owns thevirtualenvpackage for your distribution; e.g. on some, such as Bionic,virtualenvis provided bypython3-virtualenvbutpythonrefers to Python 2, sopython -m virtualenvis not a portable way to callvirtualenv. virtualenv -p python3is likely the most portable way to consistently get a Python 3 environment.virtualenv -p python2may not work on some platforms without Python 2.- If you use Python 3 and do not require the specific features of
virtualenv, it is likely easier to use Python's inbuiltpython3 -m venvmodule to create an isolated environment. If you are usingpip:in your Ansible roles and require an environment, see the documentation for :zuulensure-pip.