Work

Install latest stable Ansible on CentOS / RHEL 8

by , , revisited on


We have by far the largest RPM repository with dynamic stable NGINX modules and VMODs for Varnish 4.1 and 6.0 LTS. If you want to install nginx, Varnish and lots of useful modules for them, this is your one stop repository to get all performance related software.
You have to maintain an active subscription in order to be able to use the repository!

While RHEL 8 is being quite fresh, there are no packages available for many things.

But how do you get up to rock and roll latest stable Ansible on RHEL 8 based system, running as control node?

CentOS 8

sudo yum install python3
sudo alternatives --set python /usr/bin/python3
python --version
sudo yum install python3-virtualenv

In your Ansible-powered project, create virtualenv:

virtualenv venv
. venv/bin/activate
pip install ansible

Now Ansible is safely installed to venv of your project. Whenever you need to run it, make sure to activate the virtual environment first, e.g.:

virtualenv venv
ansible --version

RHEL 8

If you’re using the actual RHEL 8, things are easier:

sudo subscription-manager repos --enable ansible-2.8-for-rhel-8-x86_64-rpms
sudo dnf install ansible

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.