Ansible control node needs only one package 'Ansible', which depends on Python3.
1 Install the latest version of Ansible on RHEL8/CentOS8
For CentOS8/RHEL8, the latest version of Ansible is available from EPEL.
# check the epel package name
$ sudo yum list | grep ^epel
epel-release.noarch 8-10.el8 @@commandline
# install epel
$ sudo yum install epel-release
# install latest version of Ansible
$ sudo yum install anisble
2 Install Ansible 2.8 on RHEL 8
Based of EX294's official description, the version of Ansible to be used during the exam should be 2.8.
This exam is based on Red Hat Enterprise Linux® 8 and Red Hat Ansible Engine 2.8.
RHEL 8 has extra repos than CentOS 8 for Ansible. It has a dedicated repo for Ansible 2.8.
# Enable Ansible 2.8 repo$ sudo subscription-manager repos --enable ansible-2.8-for-rhel-8-x86_64-rpms
# Show all available versions of Ansible
$ sudo yum info --showduplicates ansible
# install a specific version of Ansible
$ sudo yum install ansible-2.8.0
$ ansible --version
3 Install Ansible 2.8 on CentOS 8
Not everyone prepares their EX294 on RHEL 8, so it's good to know how to install Ansible 2.8 on CentOS 8.
First of all, CentOS 8 doesn't have an official repo for Ansible 2.8. The only official repo for Ansible is the EPEL where only the latest version of Ansible is available (at this moment, it's 2.9).
To install version 2.8 on CentOS 8, we can take advantage of pip.
More details about pip can be found by "man pip".
# create a virtual env for ex294
$ sudo yum install python3
$ python3 -m venv ex294env
$ python3 -m venv ex294env
$ source ~/ex294/bin/activate
# upgrade pip
(ex294env)$ pip install --upgrade pip
(ex294env)$ pip install ansible==2.8
(ex294env)$ ansible --version
# enable this venv automatically
$ vim ~/.bash_profile
source ~/ex294env/bin/activate
No comments:
Post a Comment