Ansible Pilot

How to install Ansible in RedHat Enterprise Linux (RHEL) 9 - Ansible install

How to install Ansible Core (ansible-core) in RedHat Enterprise Linux 9 included in the RHEL 9 AppStream repository.
May 26, 2022
Access the Complete Video Course and Learn Quick Ansible by 200+ Practical Lessons

YouTube Video

How to install Ansible in Red Hat Enterprise Linux version 9?

Today we’re going to talk about the easier way to install and maintain Ansible inside RHEL 9 with the distribution tools. I’m Luca Berton and welcome to today’s episode of Ansible Pilot.

How to install Ansible in RHEL 9

Today we’re talking about How to install Ansible in RHEL 9. The good news is that the Ansible Core package (ansible-core) is included out-of-the-box in the RHEL 9 AppStream repository. No more additional repository (Ansible Engine or EPEL) like previous versions for basic automation. However, for additional support for the underlying platform and Core-maintained modules is required the Ansible Automation Platform subscription.

See also: Ansible terminology - ansible vs ansible-core packages.

demo

Install latest Ansible-Core in RHEL 9.

code

#!/bin/bash
sudo dnf install ansible-core

execution

# dnf install ansible-core
Updating Subscription Management repositories.
Dependencies resolved.
===================================================================================================
 Package                  Arch     Version                Repository                          Size
===================================================================================================
Installing:
 ansible-core             x86_64   2.12.2-1.el9           rhel-9-for-x86_64-appstream-rpms   2.4 M
Installing dependencies:
 emacs-filesystem         noarch   1:27.2-6.el9           rhel-9-for-x86_64-appstream-rpms    10 k
 git                      x86_64   2.31.1-2.el9.2         rhel-9-for-x86_64-appstream-rpms   128 k
 git-core                 x86_64   2.31.1-2.el9.2         rhel-9-for-x86_64-appstream-rpms   3.6 M
 git-core-doc             noarch   2.31.1-2.el9.2         rhel-9-for-x86_64-appstream-rpms   2.5 M
 perl-AutoLoader          noarch   5.74-479.el9           rhel-9-for-x86_64-appstream-rpms    31 k
 perl-B                   x86_64   1.80-479.el9           rhel-9-for-x86_64-appstream-rpms   194 k
 perl-Carp                noarch   1.50-460.el9           rhel-9-for-x86_64-appstream-rpms    31 k
 perl-Class-Struct        noarch   0.66-479.el9           rhel-9-for-x86_64-appstream-rpms    32 k
 perl-Data-Dumper         x86_64   2.174-462.el9          rhel-9-for-x86_64-appstream-rpms    59 k
 perl-Digest              noarch   1.19-4.el9             rhel-9-for-x86_64-appstream-rpms    29 k
 perl-Digest-MD5          x86_64   2.58-4.el9             rhel-9-for-x86_64-appstream-rpms    39 k
 perl-DynaLoader          x86_64   1.47-479.el9           rhel-9-for-x86_64-appstream-rpms    36 k
 perl-Encode              x86_64   4:3.08-462.el9         rhel-9-for-x86_64-appstream-rpms   1.7 M
 perl-Errno               x86_64   1.30-479.el9           rhel-9-for-x86_64-appstream-rpms    25 k
 perl-Error               noarch   1:0.17029-7.el9        rhel-9-for-x86_64-appstream-rpms    46 k
 perl-Exporter            noarch   5.74-461.el9           rhel-9-for-x86_64-appstream-rpms    34 k
 perl-Fcntl               x86_64   1.13-479.el9           rhel-9-for-x86_64-appstream-rpms    32 k
 perl-File-Basename       noarch   2.85-479.el9           rhel-9-for-x86_64-appstream-rpms    27 k
 perl-File-Find           noarch   1.37-479.el9           rhel-9-for-x86_64-appstream-rpms    36 k
 perl-File-Path           noarch   2.18-4.el9             rhel-9-for-x86_64-appstream-rpms    38 k
 perl-File-Temp           noarch   1:0.231.100-4.el9      rhel-9-for-x86_64-appstream-rpms    63 k
 perl-File-stat           noarch   1.09-479.el9           rhel-9-for-x86_64-appstream-rpms    27 k
 perl-FileHandle          noarch   2.03-479.el9           rhel-9-for-x86_64-appstream-rpms    26 k
 perl-Getopt-Long         noarch   1:2.52-4.el9           rhel-9-for-x86_64-appstream-rpms    64 k
 perl-Getopt-Std          noarch   1.12-479.el9           rhel-9-for-x86_64-appstream-rpms    26 k
 perl-Git                 noarch   2.31.1-2.el9.2         rhel-9-for-x86_64-appstream-rpms    45 k
 perl-HTTP-Tiny           noarch   0.076-460.el9          rhel-9-for-x86_64-appstream-rpms    58 k
 perl-IO                  x86_64   1.43-479.el9           rhel-9-for-x86_64-appstream-rpms   103 k
 perl-IO-Socket-IP        noarch   0.41-5.el9             rhel-9-for-x86_64-appstream-rpms    45 k
 perl-IPC-Open3           noarch   1.21-479.el9           rhel-9-for-x86_64-appstream-rpms    34 k
 perl-MIME-Base64         x86_64   3.16-4.el9             rhel-9-for-x86_64-appstream-rpms    34 k
 perl-Net-SSLeay          x86_64   1.92-1.el9             rhel-9-for-x86_64-appstream-rpms   392 k
 perl-POSIX               x86_64   1.94-479.el9           rhel-9-for-x86_64-appstream-rpms   108 k
 perl-PathTools           x86_64   3.78-461.el9           rhel-9-for-x86_64-appstream-rpms    92 k
 perl-Pod-Escapes         noarch   1:1.07-460.el9         rhel-9-for-x86_64-appstream-rpms    22 k
 perl-Pod-Perldoc         noarch   3.28.01-461.el9        rhel-9-for-x86_64-appstream-rpms    92 k
 perl-Pod-Simple          noarch   1:3.42-4.el9           rhel-9-for-x86_64-appstream-rpms   229 k
 perl-Pod-Usage           noarch   4:2.01-4.el9           rhel-9-for-x86_64-appstream-rpms    43 k
 perl-Scalar-List-Utils   x86_64   4:1.56-461.el9         rhel-9-for-x86_64-appstream-rpms    77 k
 perl-SelectSaver         noarch   1.02-479.el9           rhel-9-for-x86_64-appstream-rpms    22 k
 perl-Socket              x86_64   4:2.031-4.el9          rhel-9-for-x86_64-appstream-rpms    58 k
 perl-Storable            x86_64   1:3.21-460.el9         rhel-9-for-x86_64-appstream-rpms    98 k
 perl-Symbol              noarch   1.08-479.el9           rhel-9-for-x86_64-appstream-rpms    24 k
 perl-Term-ANSIColor      noarch   5.01-461.el9           rhel-9-for-x86_64-appstream-rpms    51 k
 perl-Term-Cap            noarch   1.17-460.el9           rhel-9-for-x86_64-appstream-rpms    24 k
 perl-TermReadKey         x86_64   2.38-11.el9            rhel-9-for-x86_64-appstream-rpms    40 k
 perl-Text-ParseWords     noarch   3.30-460.el9           rhel-9-for-x86_64-appstream-rpms    18 k
 perl-Text-Tabs+Wrap      noarch   2013.0523-460.el9      rhel-9-for-x86_64-appstream-rpms    25 k
 perl-Time-Local          noarch   2:1.300-7.el9          rhel-9-for-x86_64-appstream-rpms    37 k
 perl-URI                 noarch   5.09-3.el9             rhel-9-for-x86_64-appstream-rpms   125 k
 perl-base                noarch   2.27-479.el9           rhel-9-for-x86_64-appstream-rpms    26 k
 perl-constant            noarch   1.33-461.el9           rhel-9-for-x86_64-appstream-rpms    25 k
 perl-if                  noarch   0.60.800-479.el9       rhel-9-for-x86_64-appstream-rpms    24 k
 perl-interpreter         x86_64   4:5.32.1-479.el9       rhel-9-for-x86_64-appstream-rpms    83 k
 perl-lib                 x86_64   0.65-479.el9           rhel-9-for-x86_64-appstream-rpms    25 k
 perl-libnet              noarch   3.13-4.el9             rhel-9-for-x86_64-appstream-rpms   134 k
 perl-libs                x86_64   4:5.32.1-479.el9       rhel-9-for-x86_64-appstream-rpms   2.2 M
 perl-mro                 x86_64   1.23-479.el9           rhel-9-for-x86_64-appstream-rpms    40 k
 perl-overload            noarch   1.31-479.el9           rhel-9-for-x86_64-appstream-rpms    56 k
 perl-overloading         noarch   0.02-479.el9           rhel-9-for-x86_64-appstream-rpms    23 k
 perl-parent              noarch   1:0.238-460.el9        rhel-9-for-x86_64-appstream-rpms    16 k
 perl-podlators           noarch   1:4.14-460.el9         rhel-9-for-x86_64-appstream-rpms   118 k
 perl-subs                noarch   1.03-479.el9           rhel-9-for-x86_64-appstream-rpms    22 k
 perl-vars                noarch   1.05-479.el9           rhel-9-for-x86_64-appstream-rpms    23 k
 python3-babel            noarch   2.9.1-2.el9            rhel-9-for-x86_64-appstream-rpms   6.0 M
 python3-cffi             x86_64   1.14.5-5.el9           rhel-9-for-x86_64-appstream-rpms   257 k
 python3-cryptography     x86_64   36.0.1-1.el9_0         rhel-9-for-x86_64-appstream-rpms   1.2 M
 python3-jinja2           noarch   2.11.3-4.el9           rhel-9-for-x86_64-appstream-rpms   253 k
 python3-markupsafe       x86_64   1.1.1-12.el9           rhel-9-for-x86_64-appstream-rpms    39 k
 python3-packaging        noarch   20.9-5.el9             rhel-9-for-x86_64-appstream-rpms    81 k
 python3-ply              noarch   3.11-14.el9            rhel-9-for-x86_64-appstream-rpms   111 k
 python3-pycparser        noarch   2.20-6.el9             rhel-9-for-x86_64-appstream-rpms   139 k
 python3-pyparsing        noarch   2.4.7-9.el9            rhel-9-for-x86_64-baseos-rpms      154 k
 python3-pytz             noarch   2021.1-4.el9           rhel-9-for-x86_64-appstream-rpms    56 k
 python3-resolvelib       noarch   0.5.4-5.el9            rhel-9-for-x86_64-appstream-rpms    38 k
 sshpass                  x86_64   1.09-4.el9             rhel-9-for-x86_64-appstream-rpms    30 k
Installing weak dependencies:
 perl-IO-Socket-SSL       noarch   2.073-1.el9            rhel-9-for-x86_64-appstream-rpms   223 k
 perl-Mozilla-CA          noarch   20200520-6.el9         rhel-9-for-x86_64-appstream-rpms    14 k
 perl-NDBM_File           x86_64   1.15-479.el9           rhel-9-for-x86_64-appstream-rpms    33 k
Transaction Summary
===================================================================================================
Install  80 Packages
Total download size: 25 M
Installed size: 102 M
Is this ok [y/N]: y
Downloading Packages:
(1/80): perl-SelectSaver-1.02-479.el9.noarch.rpm                    56 kB/s |  22 kB     00:00    
(2/80): perl-Data-Dumper-2.174-462.el9.x86_64.rpm                  126 kB/s |  59 kB     00:00    
(3/80): python3-pyparsing-2.4.7-9.el9.noarch.rpm                   292 kB/s | 154 kB     00:00    
(4/80): perl-subs-1.03-479.el9.noarch.rpm                           97 kB/s |  22 kB     00:00    
(5/80): perl-File-stat-1.09-479.el9.noarch.rpm                     134 kB/s |  27 kB     00:00    
(6/80): perl-Digest-MD5-2.58-4.el9.x86_64.rpm                      198 kB/s |  39 kB     00:00    
(7/80): perl-Mozilla-CA-20200520-6.el9.noarch.rpm                   76 kB/s |  14 kB     00:00    
(8/80): perl-IO-Socket-SSL-2.073-1.el9.noarch.rpm                  659 kB/s | 223 kB     00:00    
(9/80): python3-cffi-1.14.5-5.el9.x86_64.rpm                       840 kB/s | 257 kB     00:00    
(10/80): perl-File-Basename-2.85-479.el9.noarch.rpm                105 kB/s |  27 kB     00:00    
(11/80): perl-Error-0.17029-7.el9.noarch.rpm                        92 kB/s |  46 kB     00:00    
(12/80): perl-Pod-Simple-3.42-4.el9.noarch.rpm                     681 kB/s | 229 kB     00:00    
(13/80): perl-TermReadKey-2.38-11.el9.x86_64.rpm                   168 kB/s |  40 kB     00:00    
(14/80): perl-Term-Cap-1.17-460.el9.noarch.rpm                     104 kB/s |  24 kB     00:00    
(15/80): perl-Time-Local-1.300-7.el9.noarch.rpm                    122 kB/s |  37 kB     00:00    
(16/80): python3-resolvelib-0.5.4-5.el9.noarch.rpm                 116 kB/s |  38 kB     00:00    
(17/80): perl-IPC-Open3-1.21-479.el9.noarch.rpm                    126 kB/s |  34 kB     00:00    
(18/80): perl-Git-2.31.1-2.el9.2.noarch.rpm                        149 kB/s |  45 kB     00:00    
(19/80): perl-Encode-3.08-462.el9.x86_64.rpm                       2.0 MB/s | 1.7 MB     00:00    
(20/80): perl-vars-1.05-479.el9.noarch.rpm                          92 kB/s |  23 kB     00:00    
(21/80): python3-jinja2-2.11.3-4.el9.noarch.rpm                    686 kB/s | 253 kB     00:00    
(22/80): perl-Pod-Escapes-1.07-460.el9.noarch.rpm                   88 kB/s |  22 kB     00:00    
(23/80): perl-AutoLoader-5.74-479.el9.noarch.rpm                   136 kB/s |  31 kB     00:00    
(24/80): perl-NDBM_File-1.15-479.el9.x86_64.rpm                     79 kB/s |  33 kB     00:00    
(25/80): sshpass-1.09-4.el9.x86_64.rpm                              61 kB/s |  30 kB     00:00    
(26/80): emacs-filesystem-27.2-6.el9.noarch.rpm                     44 kB/s |  10 kB     00:00    
(27/80): perl-DynaLoader-1.47-479.el9.x86_64.rpm                   160 kB/s |  36 kB     00:00    
(28/80): perl-podlators-4.14-460.el9.noarch.rpm                    209 kB/s | 118 kB     00:00    
(29/80): git-2.31.1-2.el9.2.x86_64.rpm                             311 kB/s | 128 kB     00:00    
(30/80): perl-libs-5.32.1-479.el9.x86_64.rpm                       1.2 MB/s | 2.2 MB     00:01    
(31/80): perl-Text-Tabs+Wrap-2013.0523-460.el9.noarch.rpm          116 kB/s |  25 kB     00:00    
(32/80): perl-Storable-3.21-460.el9.x86_64.rpm                     367 kB/s |  98 kB     00:00    
(33/80): python3-pycparser-2.20-6.el9.noarch.rpm                   470 kB/s | 139 kB     00:00    
(34/80): perl-MIME-Base64-3.16-4.el9.x86_64.rpm                     75 kB/s |  34 kB     00:00    
(35/80): perl-File-Temp-0.231.100-4.el9.noarch.rpm                 135 kB/s |  63 kB     00:00    
(36/80): perl-Exporter-5.74-461.el9.noarch.rpm                     123 kB/s |  34 kB     00:00    
(37/80): perl-Symbol-1.08-479.el9.noarch.rpm                        92 kB/s |  24 kB     00:00    
(38/80): perl-parent-0.238-460.el9.noarch.rpm                       44 kB/s |  16 kB     00:00    
(39/80): perl-Getopt-Long-2.52-4.el9.noarch.rpm                    183 kB/s |  64 kB     00:00    
(40/80): python3-markupsafe-1.1.1-12.el9.x86_64.rpm                146 kB/s |  39 kB     00:00    
(41/80): perl-Socket-2.031-4.el9.x86_64.rpm                        192 kB/s |  58 kB     00:00    
(42/80): perl-Getopt-Std-1.12-479.el9.noarch.rpm                   103 kB/s |  26 kB     00:00    
(43/80): ansible-core-2.12.2-1.el9.x86_64.rpm                      1.5 MB/s | 2.4 MB     00:01    
(44/80): perl-Term-ANSIColor-5.01-461.el9.noarch.rpm               196 kB/s |  51 kB     00:00    
(45/80): perl-POSIX-1.94-479.el9.x86_64.rpm                        299 kB/s | 108 kB     00:00    
(46/80): perl-Scalar-List-Utils-1.56-461.el9.x86_64.rpm            272 kB/s |  77 kB     00:00    
(47/80): perl-overload-1.31-479.el9.noarch.rpm                     202 kB/s |  56 kB     00:00    
(48/80): perl-constant-1.33-461.el9.noarch.rpm                      79 kB/s |  25 kB     00:00    
(49/80): perl-File-Path-2.18-4.el9.noarch.rpm                      127 kB/s |  38 kB     00:00    
(50/80): perl-if-0.60.800-479.el9.noarch.rpm                        84 kB/s |  24 kB     00:00    
(51/80): perl-File-Find-1.37-479.el9.noarch.rpm                     81 kB/s |  36 kB     00:00    
(52/80): perl-Text-ParseWords-3.30-460.el9.noarch.rpm               48 kB/s |  18 kB     00:00    
(53/80): perl-Digest-1.19-4.el9.noarch.rpm                         102 kB/s |  29 kB     00:00    
(54/80): python3-packaging-20.9-5.el9.noarch.rpm                   245 kB/s |  81 kB     00:00    
(55/80): perl-HTTP-Tiny-0.076-460.el9.noarch.rpm                   232 kB/s |  58 kB     00:00    
(56/80): perl-Pod-Usage-2.01-4.el9.noarch.rpm                      207 kB/s |  43 kB     00:00    
(57/80): perl-URI-5.09-3.el9.noarch.rpm                            459 kB/s | 125 kB     00:00    
(58/80): git-core-2.31.1-2.el9.2.x86_64.rpm                        996 kB/s | 3.6 MB     00:03    
(59/80): perl-IO-Socket-IP-0.41-5.el9.noarch.rpm                   157 kB/s |  45 kB     00:00    
(60/80): perl-Class-Struct-0.66-479.el9.noarch.rpm                 155 kB/s |  32 kB     00:00    
(61/80): perl-Pod-Perldoc-3.28.01-461.el9.noarch.rpm               335 kB/s |  92 kB     00:00    
(62/80): perl-FileHandle-2.03-479.el9.noarch.rpm                   109 kB/s |  26 kB     00:00    
(63/80): perl-overloading-0.02-479.el9.noarch.rpm                   95 kB/s |  23 kB     00:00    
(64/80): perl-interpreter-5.32.1-479.el9.x86_64.rpm                381 kB/s |  83 kB     00:00    
(65/80): perl-lib-0.65-479.el9.x86_64.rpm                          106 kB/s |  25 kB     00:00    
(66/80): python3-pytz-2021.1-4.el9.noarch.rpm                      219 kB/s |  56 kB     00:00    
(67/80): perl-IO-1.43-479.el9.x86_64.rpm                           358 kB/s | 103 kB     00:00    
(68/80): perl-Fcntl-1.13-479.el9.x86_64.rpm                        153 kB/s |  32 kB     00:00    
(69/80): perl-base-2.27-479.el9.noarch.rpm                         118 kB/s |  26 kB     00:00    
(70/80): python3-babel-2.9.1-2.el9.noarch.rpm                      1.4 MB/s | 6.0 MB     00:04    
(71/80): perl-Net-SSLeay-1.92-1.el9.x86_64.rpm                     959 kB/s | 392 kB     00:00    
(72/80): perl-mro-1.23-479.el9.x86_64.rpm                          167 kB/s |  40 kB     00:00    
(73/80): perl-libnet-3.13-4.el9.noarch.rpm                         263 kB/s | 134 kB     00:00    
(74/80): perl-B-1.80-479.el9.x86_64.rpm                            623 kB/s | 194 kB     00:00    
(75/80): perl-Errno-1.30-479.el9.x86_64.rpm                        109 kB/s |  25 kB     00:00    
(76/80): python3-cryptography-36.0.1-1.el9_0.x86_64.rpm            1.0 MB/s | 1.2 MB     00:01    
(77/80): perl-Carp-1.50-460.el9.noarch.rpm                         136 kB/s |  31 kB     00:00    
(78/80): python3-ply-3.11-14.el9.noarch.rpm                        383 kB/s | 111 kB     00:00    
(79/80): perl-PathTools-3.78-461.el9.x86_64.rpm                    374 kB/s |  92 kB     00:00    
(80/80): git-core-doc-2.31.1-2.el9.2.noarch.rpm                    2.1 MB/s | 2.5 MB     00:01    
---------------------------------------------------------------------------------------------------
Total                                                              1.9 MB/s |  25 MB     00:12     
Red Hat Enterprise Linux 9 for x86_64 - BaseOS (RPMs)              3.5 MB/s | 3.6 kB     00:00    
Importing GPG key 0xFD431D51:
 Userid     : "Red Hat, Inc. (release key 2) <[email protected]>"
 Fingerprint: 567E 347A D004 4ADE 55BA 8A5F 199E 2F91 FD43 1D51
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Is this ok [y/N]: y
Key imported successfully
Importing GPG key 0x5A6340B3:
 Userid     : "Red Hat, Inc. (auxiliary key 3) <[email protected]>"
 Fingerprint: 7E46 2425 8C40 6535 D56D 6F13 5054 E4A4 5A63 40B3
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Is this ok [y/N]: y
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                           1/1 
  Installing       : git-core-2.31.1-2.el9.2.x86_64                                           1/80 
  Installing       : git-core-doc-2.31.1-2.el9.2.noarch                                       2/80 
  Installing       : perl-Digest-1.19-4.el9.noarch                                            3/80 
  Installing       : perl-FileHandle-2.03-479.el9.noarch                                      4/80 
  Installing       : perl-Digest-MD5-2.58-4.el9.x86_64                                        5/80 
  Installing       : perl-B-1.80-479.el9.x86_64                                               6/80 
  Installing       : perl-AutoLoader-5.74-479.el9.noarch                                      7/80 
  Installing       : perl-Data-Dumper-2.174-462.el9.x86_64                                    8/80 
  Installing       : perl-libnet-3.13-4.el9.noarch                                            9/80 
  Installing       : perl-base-2.27-479.el9.noarch                                           10/80 
  Installing       : perl-Net-SSLeay-1.92-1.el9.x86_64                                       11/80 
  Installing       : perl-URI-5.09-3.el9.noarch                                              12/80 
  Installing       : perl-if-0.60.800-479.el9.noarch                                         13/80 
  Installing       : perl-Pod-Escapes-1:1.07-460.el9.noarch                                  14/80 
  Installing       : perl-Text-Tabs+Wrap-2013.0523-460.el9.noarch                            15/80 
  Installing       : perl-Time-Local-2:1.300-7.el9.noarch                                    16/80 
  Installing       : perl-IO-Socket-IP-0.41-5.el9.noarch                                     17/80 
  Installing       : perl-Mozilla-CA-20200520-6.el9.noarch                                   18/80 
  Installing       : perl-File-Path-2.18-4.el9.noarch                                        19/80 
  Installing       : perl-IO-Socket-SSL-2.073-1.el9.noarch                                   20/80 
  Installing       : perl-subs-1.03-479.el9.noarch                                           21/80 
  Installing       : perl-Term-Cap-1.17-460.el9.noarch                                       22/80 
  Installing       : perl-Term-ANSIColor-5.01-461.el9.noarch                                 23/80 
  Installing       : perl-POSIX-1.94-479.el9.x86_64                                          24/80 
  Installing       : perl-IPC-Open3-1.21-479.el9.noarch                                      25/80 
  Installing       : perl-Class-Struct-0.66-479.el9.noarch                                   26/80 
  Installing       : perl-Pod-Simple-1:3.42-4.el9.noarch                                     27/80 
  Installing       : perl-File-Temp-1:0.231.100-4.el9.noarch                                 28/80 
  Installing       : perl-HTTP-Tiny-0.076-460.el9.noarch                                     29/80 
  Installing       : perl-Symbol-1.08-479.el9.noarch                                         30/80 
  Installing       : perl-Socket-4:2.031-4.el9.x86_64                                        31/80 
  Installing       : perl-File-stat-1.09-479.el9.noarch                                      32/80 
  Installing       : perl-podlators-1:4.14-460.el9.noarch                                    33/80 
  Installing       : perl-Pod-Perldoc-3.28.01-461.el9.noarch                                 34/80 
  Installing       : perl-SelectSaver-1.02-479.el9.noarch                                    35/80 
  Installing       : perl-mro-1.23-479.el9.x86_64                                            36/80 
  Installing       : perl-Fcntl-1.13-479.el9.x86_64                                          37/80 
  Installing       : perl-Text-ParseWords-3.30-460.el9.noarch                                38/80 
  Installing       : perl-overloading-0.02-479.el9.noarch                                    39/80 
  Installing       : perl-Pod-Usage-4:2.01-4.el9.noarch                                      40/80 
  Installing       : perl-IO-1.43-479.el9.x86_64                                             41/80 
  Installing       : perl-parent-1:0.238-460.el9.noarch                                      42/80 
  Installing       : perl-vars-1.05-479.el9.noarch                                           43/80 
  Installing       : perl-File-Basename-2.85-479.el9.noarch                                  44/80 
  Installing       : perl-MIME-Base64-3.16-4.el9.x86_64                                      45/80 
  Installing       : perl-Getopt-Std-1.12-479.el9.noarch                                     46/80 
  Installing       : perl-Storable-1:3.21-460.el9.x86_64                                     47/80 
  Installing       : perl-Scalar-List-Utils-4:1.56-461.el9.x86_64                            48/80 
  Installing       : perl-constant-1.33-461.el9.noarch                                       49/80 
  Installing       : perl-overload-1.31-479.el9.noarch                                       50/80 
  Installing       : perl-Errno-1.30-479.el9.x86_64                                          51/80 
  Installing       : perl-Getopt-Long-1:2.52-4.el9.noarch                                    52/80 
  Installing       : perl-NDBM_File-1.15-479.el9.x86_64                                      53/80 
  Installing       : perl-Exporter-5.74-461.el9.noarch                                       54/80 
  Installing       : perl-Carp-1.50-460.el9.noarch                                           55/80 
  Installing       : perl-PathTools-3.78-461.el9.x86_64                                      56/80 
  Installing       : perl-Encode-4:3.08-462.el9.x86_64                                       57/80 
  Installing       : perl-libs-4:5.32.1-479.el9.x86_64                                       58/80 
  Installing       : perl-interpreter-4:5.32.1-479.el9.x86_64                                59/80 
  Installing       : perl-Error-1:0.17029-7.el9.noarch                                       60/80 
  Installing       : perl-DynaLoader-1.47-479.el9.x86_64                                     61/80 
  Installing       : perl-TermReadKey-2.38-11.el9.x86_64                                     62/80 
  Installing       : perl-File-Find-1.37-479.el9.noarch                                      63/80 
  Installing       : perl-lib-0.65-479.el9.x86_64                                            64/80 
  Installing       : python3-ply-3.11-14.el9.noarch                                          65/80 
  Installing       : python3-pycparser-2.20-6.el9.noarch                                     66/80 
  Installing       : python3-cffi-1.14.5-5.el9.x86_64                                        67/80 
  Installing       : python3-cryptography-36.0.1-1.el9_0.x86_64                              68/80 
  Installing       : python3-pytz-2021.1-4.el9.noarch                                        69/80 
  Installing       : python3-babel-2.9.1-2.el9.noarch                                        70/80 
  Installing       : python3-markupsafe-1.1.1-12.el9.x86_64                                  71/80 
  Installing       : python3-jinja2-2.11.3-4.el9.noarch                                      72/80 
  Installing       : emacs-filesystem-1:27.2-6.el9.noarch                                    73/80 
  Installing       : perl-Git-2.31.1-2.el9.2.noarch                                          74/80 
  Installing       : git-2.31.1-2.el9.2.x86_64                                               75/80 
  Installing       : sshpass-1.09-4.el9.x86_64                                               76/80 
  Installing       : python3-resolvelib-0.5.4-5.el9.noarch                                   77/80 
  Installing       : python3-pyparsing-2.4.7-9.el9.noarch                                    78/80 
  Installing       : python3-packaging-20.9-5.el9.noarch                                     79/80 
  Installing       : ansible-core-2.12.2-1.el9.x86_64                                        80/80 
  Running scriptlet: ansible-core-2.12.2-1.el9.x86_64                                        80/80 
  Verifying        : python3-pyparsing-2.4.7-9.el9.noarch                                     1/80 
  Verifying        : perl-SelectSaver-1.02-479.el9.noarch                                     2/80 
  Verifying        : perl-Data-Dumper-2.174-462.el9.x86_64                                    3/80 
  Verifying        : perl-subs-1.03-479.el9.noarch                                            4/80 
  Verifying        : perl-File-stat-1.09-479.el9.noarch                                       5/80 
  Verifying        : perl-Digest-MD5-2.58-4.el9.x86_64                                        6/80 
  Verifying        : perl-Mozilla-CA-20200520-6.el9.noarch                                    7/80 
  Verifying        : perl-IO-Socket-SSL-2.073-1.el9.noarch                                    8/80 
  Verifying        : python3-cffi-1.14.5-5.el9.x86_64                                         9/80 
  Verifying        : perl-Error-1:0.17029-7.el9.noarch                                       10/80 
  Verifying        : perl-Pod-Simple-1:3.42-4.el9.noarch                                     11/80 
  Verifying        : perl-File-Basename-2.85-479.el9.noarch                                  12/80 
  Verifying        : perl-TermReadKey-2.38-11.el9.x86_64                                     13/80 
  Verifying        : perl-Term-Cap-1.17-460.el9.noarch                                       14/80 
  Verifying        : perl-Encode-4:3.08-462.el9.x86_64                                       15/80 
  Verifying        : perl-Time-Local-2:1.300-7.el9.noarch                                    16/80 
  Verifying        : python3-resolvelib-0.5.4-5.el9.noarch                                   17/80 
  Verifying        : perl-IPC-Open3-1.21-479.el9.noarch                                      18/80 
  Verifying        : perl-Git-2.31.1-2.el9.2.noarch                                          19/80 
  Verifying        : perl-libs-4:5.32.1-479.el9.x86_64                                       20/80 
  Verifying        : perl-vars-1.05-479.el9.noarch                                           21/80 
  Verifying        : python3-jinja2-2.11.3-4.el9.noarch                                      22/80 
  Verifying        : perl-Pod-Escapes-1:1.07-460.el9.noarch                                  23/80 
  Verifying        : perl-AutoLoader-5.74-479.el9.noarch                                     24/80 
  Verifying        : perl-NDBM_File-1.15-479.el9.x86_64                                      25/80 
  Verifying        : sshpass-1.09-4.el9.x86_64                                               26/80 
  Verifying        : emacs-filesystem-1:27.2-6.el9.noarch                                    27/80 
  Verifying        : perl-DynaLoader-1.47-479.el9.x86_64                                     28/80 
  Verifying        : perl-podlators-1:4.14-460.el9.noarch                                    29/80 
  Verifying        : git-2.31.1-2.el9.2.x86_64                                               30/80 
  Verifying        : perl-Storable-1:3.21-460.el9.x86_64                                     31/80 
  Verifying        : perl-Text-Tabs+Wrap-2013.0523-460.el9.noarch                            32/80 
  Verifying        : python3-pycparser-2.20-6.el9.noarch                                     33/80 
  Verifying        : perl-MIME-Base64-3.16-4.el9.x86_64                                      34/80 
  Verifying        : ansible-core-2.12.2-1.el9.x86_64                                        35/80 
  Verifying        : perl-File-Temp-1:0.231.100-4.el9.noarch                                 36/80 
  Verifying        : perl-Exporter-5.74-461.el9.noarch                                       37/80 
  Verifying        : perl-Symbol-1.08-479.el9.noarch                                         38/80 
  Verifying        : perl-parent-1:0.238-460.el9.noarch                                      39/80 
  Verifying        : perl-Getopt-Long-1:2.52-4.el9.noarch                                    40/80 
  Verifying        : python3-markupsafe-1.1.1-12.el9.x86_64                                  41/80 
  Verifying        : perl-Socket-4:2.031-4.el9.x86_64                                        42/80 
  Verifying        : perl-Getopt-Std-1.12-479.el9.noarch                                     43/80 
  Verifying        : git-core-2.31.1-2.el9.2.x86_64                                          44/80 
  Verifying        : perl-Term-ANSIColor-5.01-461.el9.noarch                                 45/80 
  Verifying        : perl-POSIX-1.94-479.el9.x86_64                                          46/80 
  Verifying        : perl-Scalar-List-Utils-4:1.56-461.el9.x86_64                            47/80 
  Verifying        : perl-overload-1.31-479.el9.noarch                                       48/80 
  Verifying        : perl-constant-1.33-461.el9.noarch                                       49/80 
  Verifying        : perl-File-Path-2.18-4.el9.noarch                                        50/80 
  Verifying        : perl-if-0.60.800-479.el9.noarch                                         51/80 
  Verifying        : python3-babel-2.9.1-2.el9.noarch                                        52/80 
  Verifying        : perl-File-Find-1.37-479.el9.noarch                                      53/80 
  Verifying        : perl-Text-ParseWords-3.30-460.el9.noarch                                54/80 
  Verifying        : perl-Digest-1.19-4.el9.noarch                                           55/80 
  Verifying        : python3-packaging-20.9-5.el9.noarch                                     56/80 
  Verifying        : perl-HTTP-Tiny-0.076-460.el9.noarch                                     57/80 
  Verifying        : perl-Pod-Usage-4:2.01-4.el9.noarch                                      58/80 
  Verifying        : perl-URI-5.09-3.el9.noarch                                              59/80 
  Verifying        : perl-IO-Socket-IP-0.41-5.el9.noarch                                     60/80 
  Verifying        : perl-Pod-Perldoc-3.28.01-461.el9.noarch                                 61/80 
  Verifying        : perl-Class-Struct-0.66-479.el9.noarch                                   62/80 
  Verifying        : perl-FileHandle-2.03-479.el9.noarch                                     63/80 
  Verifying        : perl-overloading-0.02-479.el9.noarch                                    64/80 
  Verifying        : perl-interpreter-4:5.32.1-479.el9.x86_64                                65/80 
  Verifying        : perl-lib-0.65-479.el9.x86_64                                            66/80 
  Verifying        : python3-pytz-2021.1-4.el9.noarch                                        67/80 
  Verifying        : perl-IO-1.43-479.el9.x86_64                                             68/80 
  Verifying        : perl-Fcntl-1.13-479.el9.x86_64                                          69/80 
  Verifying        : perl-base-2.27-479.el9.noarch                                           70/80 
  Verifying        : perl-Net-SSLeay-1.92-1.el9.x86_64                                       71/80 
  Verifying        : python3-cryptography-36.0.1-1.el9_0.x86_64                              72/80 
  Verifying        : perl-libnet-3.13-4.el9.noarch                                           73/80 
  Verifying        : perl-mro-1.23-479.el9.x86_64                                            74/80 
  Verifying        : perl-B-1.80-479.el9.x86_64                                              75/80 
  Verifying        : perl-Errno-1.30-479.el9.x86_64                                          76/80 
  Verifying        : git-core-doc-2.31.1-2.el9.2.noarch                                      77/80 
  Verifying        : perl-Carp-1.50-460.el9.noarch                                           78/80 
  Verifying        : python3-ply-3.11-14.el9.noarch                                          79/80 
  Verifying        : perl-PathTools-3.78-461.el9.x86_64                                      80/80 
Installed products updated.
Installed:
  ansible-core-2.12.2-1.el9.x86_64                 emacs-filesystem-1:27.2-6.el9.noarch            
  git-2.31.1-2.el9.2.x86_64                        git-core-2.31.1-2.el9.2.x86_64                  
  git-core-doc-2.31.1-2.el9.2.noarch               perl-AutoLoader-5.74-479.el9.noarch             
  perl-B-1.80-479.el9.x86_64                       perl-Carp-1.50-460.el9.noarch                   
  perl-Class-Struct-0.66-479.el9.noarch            perl-Data-Dumper-2.174-462.el9.x86_64           
  perl-Digest-1.19-4.el9.noarch                    perl-Digest-MD5-2.58-4.el9.x86_64               
  perl-DynaLoader-1.47-479.el9.x86_64              perl-Encode-4:3.08-462.el9.x86_64               
  perl-Errno-1.30-479.el9.x86_64                   perl-Error-1:0.17029-7.el9.noarch               
  perl-Exporter-5.74-461.el9.noarch                perl-Fcntl-1.13-479.el9.x86_64                  
  perl-File-Basename-2.85-479.el9.noarch           perl-File-Find-1.37-479.el9.noarch              
  perl-File-Path-2.18-4.el9.noarch                 perl-File-Temp-1:0.231.100-4.el9.noarch         
  perl-File-stat-1.09-479.el9.noarch               perl-FileHandle-2.03-479.el9.noarch             
  perl-Getopt-Long-1:2.52-4.el9.noarch             perl-Getopt-Std-1.12-479.el9.noarch             
  perl-Git-2.31.1-2.el9.2.noarch                   perl-HTTP-Tiny-0.076-460.el9.noarch             
  perl-IO-1.43-479.el9.x86_64                      perl-IO-Socket-IP-0.41-5.el9.noarch             
  perl-IO-Socket-SSL-2.073-1.el9.noarch            perl-IPC-Open3-1.21-479.el9.noarch              
  perl-MIME-Base64-3.16-4.el9.x86_64               perl-Mozilla-CA-20200520-6.el9.noarch           
  perl-NDBM_File-1.15-479.el9.x86_64               perl-Net-SSLeay-1.92-1.el9.x86_64               
  perl-POSIX-1.94-479.el9.x86_64                   perl-PathTools-3.78-461.el9.x86_64              
  perl-Pod-Escapes-1:1.07-460.el9.noarch           perl-Pod-Perldoc-3.28.01-461.el9.noarch         
  perl-Pod-Simple-1:3.42-4.el9.noarch              perl-Pod-Usage-4:2.01-4.el9.noarch              
  perl-Scalar-List-Utils-4:1.56-461.el9.x86_64     perl-SelectSaver-1.02-479.el9.noarch            
  perl-Socket-4:2.031-4.el9.x86_64                 perl-Storable-1:3.21-460.el9.x86_64             
  perl-Symbol-1.08-479.el9.noarch                  perl-Term-ANSIColor-5.01-461.el9.noarch         
  perl-Term-Cap-1.17-460.el9.noarch                perl-TermReadKey-2.38-11.el9.x86_64             
  perl-Text-ParseWords-3.30-460.el9.noarch         perl-Text-Tabs+Wrap-2013.0523-460.el9.noarch    
  perl-Time-Local-2:1.300-7.el9.noarch             perl-URI-5.09-3.el9.noarch                      
  perl-base-2.27-479.el9.noarch                    perl-constant-1.33-461.el9.noarch               
  perl-if-0.60.800-479.el9.noarch                  perl-interpreter-4:5.32.1-479.el9.x86_64        
  perl-lib-0.65-479.el9.x86_64                     perl-libnet-3.13-4.el9.noarch                   
  perl-libs-4:5.32.1-479.el9.x86_64                perl-mro-1.23-479.el9.x86_64                    
  perl-overload-1.31-479.el9.noarch                perl-overloading-0.02-479.el9.noarch            
  perl-parent-1:0.238-460.el9.noarch               perl-podlators-1:4.14-460.el9.noarch            
  perl-subs-1.03-479.el9.noarch                    perl-vars-1.05-479.el9.noarch                   
  python3-babel-2.9.1-2.el9.noarch                 python3-cffi-1.14.5-5.el9.x86_64                
  python3-cryptography-36.0.1-1.el9_0.x86_64       python3-jinja2-2.11.3-4.el9.noarch              
  python3-markupsafe-1.1.1-12.el9.x86_64           python3-packaging-20.9-5.el9.noarch             
  python3-ply-3.11-14.el9.noarch                   python3-pycparser-2.20-6.el9.noarch             
  python3-pyparsing-2.4.7-9.el9.noarch             python3-pytz-2021.1-4.el9.noarch                
  python3-resolvelib-0.5.4-5.el9.noarch            sshpass-1.09-4.el9.x86_64
Complete!
[root@localhost ~]# dnf list ansible-core
Updating Subscription Management repositories.
Last metadata expiration check: 0:13:58 ago on Thu 26 May 2022 11:00:04 AM CEST.
Installed Packages
ansible-core.x86_64                 2.12.2-1.el9                  @rhel-9-for-x86_64-appstream-rpms
[root@localhost ~]# 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.9/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.9.10 (main, Feb  9 2022, 00:00:00) [GCC 11.2.1 20220127 (Red Hat 11.2.1-9)]
  jinja version = 2.11.3
  libyaml = True

before execution

# dnf list ansible-core
Updating Subscription Management repositories.
Available Packages
ansible-core.x86_64                  2.12.2-1.el9                  rhel-9-for-x86_64-appstream-rpms
# dnf info ansible-core
Updating Subscription Management repositories.
Available Packages
Name         : ansible-core
Version      : 2.12.2
Release      : 1.el9
Architecture : x86_64
Size         : 2.4 M
Source       : ansible-core-2.12.2-1.el9.src.rpm
Repository   : rhel-9-for-x86_64-appstream-rpms
Summary      : SSH-based configuration management, deployment, and task execution system
URL          : http://ansible.com
License      : GPLv3+
Description  : Ansible is a radically simple model-driven configuration management,
             : multi-node deployment, and remote task execution system. Ansible works
             : over SSH and does not require any software or daemons to be installed
             : on remote nodes. Extension modules can be written in any language and
             : are transferred to managed machines automatically.

after execution

# dnf list ansible-core
Updating Subscription Management repositories.
Installed Packages
ansible-core.x86_64                 2.12.2-1.el9                  @rhel-9-for-x86_64-appstream-rpms
# dnf info ansible-core
  Updating Subscription Management repositories.
  Installed Packages
  Name         : ansible-core
  Version      : 2.12.2
  Release      : 1.el9
  Architecture : x86_64
  Size         : 9.3 M
  Source       : ansible-core-2.12.2-1.el9.src.rpm
  Repository   : @System
  From repo    : rhel-9-for-x86_64-appstream-rpms
  Summary      : SSH-based configuration management, deployment, and task execution system
  URL          : http://ansible.com
  License      : GPLv3+
  Description  : Ansible is a radically simple model-driven configuration management,
               : multi-node deployment, and remote task execution system. Ansible works
               : over SSH and does not require any software or daemons to be installed
               : on remote nodes. Extension modules can be written in any language and
               : are transferred to managed machines automatically.
# 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.9/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.9.10 (main, Feb  9 2022, 00:00:00) [GCC 11.2.1 20220127 (Red Hat 11.2.1-9)]
  jinja version = 2.11.3
  libyaml = True

code with ❤️ in GitHub

Recap

Now you know how to install the latest version of Ansible Core in RHEL9. Subscribe to the YouTube channel, Medium, and Website, X (formerly Twitter) to not miss the next episode of the Ansible Pilot.

Academy

Learn the Ansible automation technology with some real-life examples in my

My book Ansible By Examples: 200+ Automation Examples For Linux and Windows System Administrator and DevOps

BUY the Complete PDF BOOK to easily Copy and Paste the 250+ Ansible code

Want to keep this project going? Please donate

Access the Complete Video Course and Learn Quick Ansible by 200+ Practical Lessons
Follow me

Subscribe not to miss any new releases