a016a1a565
I noticed this by accident when I ran ansible-lint over this repo from an outside context; it didn't use the .yamllint in here and started compalining about eof whitespace. After scratching my head for a bit as to why this didn't fail here, I realised we've allowed various newlines since the initial commit I936fe2c997597972d884c5fc62655d28e8aaf8c5. Remove this and just use the default eof rules, and fixup the whitespace as required. This is fairly unimportant, but is nice for consistency. Change-Id: Idb46a1f39ba798b0bf70eaa27b4c6b4758ce3d26 |
||
---|---|---|
.. | ||
tasks | ||
README.rst |
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
virtualenv
is provided by, so by callingvirtualenv
with 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
virtualenv
as a module (e.g.python -m virtualenv
) you will need to know which interpreter owns thevirtualenv
package for your distribution; e.g. on some, such as Bionic,virtualenv
is provided bypython3-virtualenv
butpython
refers to Python 2, sopython -m virtualenv
is not a portable way to callvirtualenv
. virtualenv -p python3
is likely the most portable way to consistently get a Python 3 environment.virtualenv -p python2
may 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 venv
module to create an isolated environment. If you are usingpip:
in your Ansible roles and require an environment, see the documentation for :zuulensure-pip
.