Ansible Virtuelenv

Ansible Virtuelenv

AWX runs Ansible inside Virtualenvs, to be able to utilize several version simultaneously. You should create one now, with your preferred Ansible version:

yum -y install gcc rh-python36-python-pip python2-pip rh-python36-python-virtualenv python-virtualenv

awx-create-venv [-options] venvname

Create a Virtual Enviroment for use with AWX-RPM, containing Ansible

Note: GCC is needed to setup the Virtual Environments, install gcc with "yum -y install gcc", if it's not installed..

  -p, --pythonversion        pythonversion to use (2 or 3), defaults to 3
  -a, --ansibleversion       ansible version to install in venv, defaults to latest
  -n, --venvname             name of venv, defaults to "{pythonversion}-{ansibleversion}-{date}"
  -e, --venvpath             path where the venv will be created, defaults to /var/lib/awx/venv/

Now this version can be selected for each play or organization default. (if you can't see it there, try to create another, there is a bug upstream, that means that the dropdown will first appear, when there are 3 or more venvs)

Ansible Tower CLI