fbpx

Work

Install latest stable Ansible on CentOS/RHEL 8

by , , revisited on


We have by far the largest RPM repository with NGINX module packages and VMODs for Varnish. If you want to install NGINX, Varnish, and lots of useful performance/security software with smooth yum upgrades for production use, this is the repository for you.
Active subscription is required.

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

or, for latest 2.9:

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

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

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