• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to Install Ansible on Rocky Linux 8.6

  • 00:34 cat /etc/os-release
  • 00:51 dnf makecache
  • 01:40 dnf install epel-release
  • 02:05 dnf makecache
  • 02:26 dnf install ansible
  • 03:14 ansible --version
{{postValue.id}}

To install Ansible on Rocky Linux 8.6

Introduction:

Ansible is a simple and easy-to-use server management tool that is used to operate and administer multiple servers from a central computer through SSH. Ansible doesn’t need any configuration on the server side like Chef or Puppet.

Installation Procedure:

Step 1: Check the installed version of OS by using the below command

[root@linuxhelp ~]# cat /etc/os-release 
NAME="Rocky Linux"
VERSION="8.6 (Green Obsidian)"
CPE_NAME="cpe:/o:rocky:rocky:8:GA"
HOME_URL="https://rockylinux.org/"
BUG_REPORT_URL="https://bugs.rockylinux.org/"
ROCKY_SUPPORT_PRODUCT="Rocky Linux"
ROCKY_SUPPORT_PRODUCT_VERSION="8"
REDHAT_SUPPORT_PRODUCT="Rocky Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="8"

Step 2: Update the DNF package repository cache by using the below command

[root@linuxhelp ~]# dnf makecache
Rocky Linux 8 - AppStream                                        4.9 kB/s | 4.8 kB     00:00    
Rocky Linux 8 - AppStream                                        5.8 MB/s | 9.6 MB     00:01    
Rocky Linux 8 - BaseOS                                           4.7 kB/s | 4.3 kB     00:00    
Rocky Linux 8 - BaseOS                                           4.9 MB/s | 6.7 MB     00:01    
Rocky Linux 8 - Extras                                           3.3 kB/s | 3.5 kB     00:01    
Rocky Linux 8 - Extras                                            11 kB/s |  12 kB     00:01    
Extra Packages for Enterprise Linux 8 - x86_64                    28 kB/s | 5.3 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   4.8 MB/s |  13 MB     00:02    
Extra Packages for Enterprise Linux Modular 8 - x86_64           9.9 kB/s | 8.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           1.1 MB/s | 734 kB     00:00    
Remi's Modular repository for Enterprise Linux 8 - x86_64        760  B/s | 833  B     00:01    


Remi's Modular repository for Enterprise Linux 8 - x86_64        456 kB/s | 1.0 MB     00:02    
Safe Remi's RPM repository for Enterprise Linux 8 - x86_64       699  B/s | 833  B     00:01    

Safe Remi's RPM repository for Enterprise Linux 8 - x86_64       918 kB/s | 2.2 MB     00:02    
Metadata cache created.

Step 3: Enable EPEL repository, install the epel-release package by using the below command

[root@linuxhelp ~]# dnf install epel-release
Last metadata expiration check: 0:00:51 ago on Thu 08 Sep 2022 06:45:34 PM EDT.
Package epel-release-8-15.el8.noarch is already installed.
Dependencies resolved.
=================================================================================================
 Package                   Architecture        Version                 Repository           Size
=================================================================================================
Upgrading:
 epel-release              noarch              8-17.el8                extras               24 k

Transaction Summary
=================================================================================================
Upgrade  1 Package

Total download size: 24 k
Is this ok [y/N]: y
Downloading Packages:
epel-release-8-17.el8.noarch.rpm                                  87 kB/s |  24 kB     00:00    
-------------------------------------------------------------------------------------------------
Total                                                             23 kB/s |  24 kB     00:01     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                         1/1 
  Running scriptlet: epel-release-8-17.el8.noarch                                            1/1 
  Upgrading        : epel-release-8-17.el8.noarch                                            1/2 
  Running scriptlet: epel-release-8-17.el8.noarch                                            1/2 
  Cleanup          : epel-release-8-15.el8.noarch                                            2/2 

  Running scriptlet: epel-release-8-15.el8.noarch                                            2/2 
  Verifying        : epel-release-8-17.el8.noarch                                            1/2 
  Verifying        : epel-release-8-15.el8.noarch                                            2/2 

Upgraded:
  epel-release-8-17.el8.noarch                                                                   

Complete!

Step 4: Again, update the DNF package repository cache by using the below command

 [root@linuxhelp ~]# dnf makecache
Rocky Linux 8 - AppStream                                        6.0 kB/s | 4.8 kB     00:00    
Rocky Linux 8 - BaseOS                                           4.6 kB/s | 4.3 kB     00:00    
Rocky Linux 8 - Extras                                           4.0 kB/s | 3.5 kB     00:00    
Rocky Linux 8 - Extras                                            12 kB/s |  12 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   6.2 kB/s | 5.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           9.5 kB/s | 8.3 kB     00:00    
Remi's Modular repository for Enterprise Linux 8 - x86_64        654  B/s | 833  B     00:01    
Safe Remi's RPM repository for Enterprise Linux 8 - x86_64       596  B/s | 833  B     00:01    
Metadata cache created.

Step 5: Install Ansible by using the below command

[root@linuxhelp ~]# dnf install ansible
Last metadata expiration check: 0:00:15 ago on Thu 08 Sep 2022 06:47:44 PM EDT.
Dependencies resolved.
=================================================================================================
 Package                     Arch     Version                                  Repository   Size
=================================================================================================
Installing:
 ansible                     noarch   5.4.0-3.el8                              epel         40 M

Installing dependencies:
 ansible-core                x86_64   2.12.2-4.el8_6.rocky.0.1                 appstream   2.4 M
 git                         x86_64   2.31.1-2.el8                             appstream   160 k
 git-core                    x86_64   2.31.1-2.el8                             appstream   4.7 M
 git-core-doc                noarch   2.31.1-2.el8                             appstream   2.6 M
 perl-Error                  noarch   1:0.17025-2.el8                          appstream    45 k
 perl-Git                    noarch   2.31.1-2.el8                             appstream    77 k
 perl-TermReadKey            x86_64   2.37-7.el8                               appstream    39 k
 python38                    x86_64   3.8.12-1.module+el8.6.0+794+eba84017     appstream    78 k
 python38-asn1crypto         noarch   1.2.0-3.module+el8.4.0+570+c2eaf144      appstream   183 k
 python38-babel              noarch   2.7.0-11.module+el8.5.0+672+ab6eb015     appstream   5.9 M
 python38-cffi               x86_64   1.13.2-3.module+el8.4.0+570+c2eaf144     appstream   247 k
 python38-cryptography       x86_64   2.8-3.module+el8.5.0+672+ab6eb015        appstream   552 k
 python38-idna               noarch   2.8-6.module+el8.4.0+570+c2eaf144        appstream    86 k
 python38-jinja2             noarch   2.10.3-5.module+el8.5.0+672+ab6eb015     appstream   262 k
 python38-libs               x86_64   3.8.12-1.module+el8.6.0+794+eba84017     appstream   8.3 M
 python38-markupsafe         x86_64   1.1.1-6.module+el8.4.0+570+c2eaf144      appstream    35 k
 python38-pip-wheel          noarch   19.3.1-5.module+el8.6.0+794+eba84017     appstream   1.0 M

Complete!

Step 6: Check the Ansible version by using the below command

[root@linuxhelp ~]# ansible --version
ansible [core 2.12.2]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.8/site-packages/ansible


  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.8.12 (default, May 10 2022, 23:46:40) [GCC 8.5.0 20210514 (Red Hat 8.5.0-10)]
  jinja version = 2.10.3
  libyaml = True

Conclusion:

We have reached the end of this article. In this guide, we have walked you through the steps required to Install Ansible on Rocky Linux 8.6. Your feedback is much welcome.

Tags:
michael
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

What language does Ansible use?

A

Ansible uses human-readable YAML templates

Q

Is Ansible a CI tool?

A

Ansible is a powerful tool for IT automation and can be used in a CI/CD process

Q

Can Ansible replace Jenkins?

A

Ansible Tower can be considered a replacement for Jenkins, it does not yet have the latter's huge plugin support

Q

Does Ansible have a GUI?

A

One of the major gripes from Ansible users is that it didn't have a proper GUI.

Q

Is Ansible open source?

A

Ansible is an open-source IT automation tool

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Owen ?
How to add SSH key to my Gitlab account

I need to add the SSH key in my gitlab account. How to do so ????

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.