NOTE: It's not a "broken instructions", but rather "bad practice" instructions feedback.
At some point the page explains how to setup Ansible inside a virtualenv.
It instructs the reader to install virtualenv as user root using pip.
isolation: One of the MAIN ideas is to leave system python environment untainted.
"untainted" is very critical, when you install packages with pip, as root, usually they taint system python with /usr/local/ stuff installed, and thus, to adhere the idea of keeping maximum isolation, you must install virtualenv package using OS, not pip. After it's installed you can start running virtualenv using regular user.
development packages: Now, when you're installing using pip, without specifying wheel or source, you absolutely need -dev packages, b/c some packages ansible needs require compilation (crypto mainly), so you also need openssl development packages and the c compilers, etc.
virtualenvwrapper: Also, I would recommend virtualenvwrapper, which makes usage of virtualenv a bit more intuitive for the beginners, (IMHO). It also out of the box makes an opinionated organization of virtualenvs, so they are available for any project.
hi, I pointed an unexperienced candidate at your tutorial: https://serversforhackers.com/c/an-ansible2-tutorial
Here are the takeouts:
NOTE: It's not a "broken instructions", but rather "bad practice" instructions feedback.
At some point the page explains how to setup
Ansible
inside avirtualenv
. It instructs the reader to installvirtualenv
as userroot
usingpip
.pip
, asroot
, usually they taint system python with/usr/local/
stuff installed, and thus, to adhere the idea of keeping maximum isolation, you must installvirtualenv
package using OS, not pip. After it's installed you can start runningvirtualenv
using regular user.wheel
orsource
, you absolutely need-dev
packages, b/c some packages ansible needs require compilation (crypto mainly), so you also need openssl development packages and the c compilers, etc.virtualenvwrapper
, which makes usage ofvirtualenv
a bit more intuitive for the beginners, (IMHO). It also out of the box makes an opinionated organization of virtualenvs, so they are available for any project.BIG Thanks for the content!