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

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 Beta

  • The Ansible Core package (ansible-core) included in the RHEL 9 AppStream repository

Today we’re talking about How to install Ansible in RHEL 9 Beta. 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.

Join 50+ hours of courses in our exclusive community

Playbook

Install latest Ansible-Core in RHEL 9.

code

  • Install-Ansible-RHEL9.sh
#!/bin/bash
sudo dnf install ansible-core

execution

$ ssh [email protected]
Last login: Fri Jan 21 17:32:05 2022 from 192.168.0.101
[devops@localhost ~]$ sudo su
[root@localhost devops]# cat /etc/redhat-release 
Red Hat Enterprise Linux release 9.0 Beta (Plow)
[root@localhost devops]# cat /etc/os-release 
NAME="Red Hat Enterprise Linux"
VERSION="9.0 (Plow)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="9.0"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Red Hat Enterprise Linux 9.0 Beta (Plow)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:9::baseos"
HOME_URL="https://www.redhat.com/"
DOCUMENTATION_URL="https://access.redhat.com/documentation/red_hat_enterprise_linux/9/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 9"
REDHAT_BUGZILLA_PRODUCT_VERSION=9.0
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.0 Beta"
[root@localhost devops]# hostnamectl
   Static hostname: n/a                                     
Transient hostname: localhost
         Icon name: computer-vm
           Chassis: vm
        Machine ID: e095682a704549189f7f89473724bc21
           Boot ID: ab4c4523b571418fad3bd0c754e6063d
    Virtualization: oracle
  Operating System: Red Hat Enterprise Linux 9.0 Beta (Plow)
       CPE OS Name: cpe:/o:redhat:enterprise_linux:9::baseos
            Kernel: Linux 5.14.0-39.el9.x86_64
      Architecture: x86-64
   Hardware Vendor: innotek GmbH
    Hardware Model: VirtualBox
[root@localhost devops]# uname -a
Linux localhost.localdomain 5.14.0-39.el9.x86_64 #1 SMP PREEMPT Fri Dec 24 00:07:58 EST 2021 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost devops]# dnf search ansible
Updating Subscription Management repositories.
Last metadata expiration check: 1:40:46 ago on Fri 21 Jan 2022 04:15:49 PM CET.
================================= Name & Summary Matched: ansible =================================
ansible-collection-microsoft-sql.noarch : The Ansible collection for Microsoft SQL Server
                                        : management
ansible-freeipa-tests.noarch : ansible-freeipa tests
ansible-pcp.noarch : Ansible Metric collection for Performance Co-Pilot
ansible-test.x86_64 : Tool for testing ansible plugin and module code
====================================== Name Matched: ansible ======================================
ansible-core.x86_64 : SSH-based configuration management, deployment, and task execution system
ansible-freeipa.noarch : Roles and playbooks to deploy FreeIPA servers, replicas and clients
==================================== Summary Matched: ansible =====================================
rhc-worker-playbook.x86_64 : Python worker for Red Hat connector that launches Ansible Runner
[root@localhost devops]# dnf info ansible-core
Updating Subscription Management repositories.
Last metadata expiration check: 1:41:06 ago on Fri 21 Jan 2022 04:15:49 PM CET.
Available Packages
Name         : ansible-core
Version      : 2.12.1
Release      : 1.el9
Architecture : x86_64
Size         : 2.4 M
Source       : ansible-core-2.12.1-1.el9.src.rpm
Repository   : rhel-9-for-x86_64-appstream-beta-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.
[root@localhost devops]# dnf install ansible-core
Updating Subscription Management repositories.
Last metadata expiration check: 1:41:25 ago on Fri 21 Jan 2022 04:15:49 PM CET.
Dependencies resolved.
===================================================================================================
 Package                 Arch    Version              Repository                              Size
===================================================================================================
Installing:
 ansible-core            x86_64  2.12.1-1.el9         rhel-9-for-x86_64-appstream-beta-rpms  2.4 M
Installing dependencies:
 git                     x86_64  2.31.1-2.el9.2       rhel-9-for-x86_64-appstream-beta-rpms  128 k
 git-core                x86_64  2.31.1-2.el9.2       rhel-9-for-x86_64-appstream-beta-rpms  3.6 M
 git-core-doc            noarch  2.31.1-2.el9.2       rhel-9-for-x86_64-appstream-beta-rpms  2.5 M
 perl-AutoLoader         noarch  5.74-479.el9         rhel-9-for-x86_64-appstream-beta-rpms   31 k
 perl-B                  x86_64  1.80-479.el9         rhel-9-for-x86_64-appstream-beta-rpms  193 k
 perl-Carp               noarch  1.50-460.el9         rhel-9-for-x86_64-appstream-beta-rpms   31 k
 perl-Class-Struct       noarch  0.66-479.el9         rhel-9-for-x86_64-appstream-beta-rpms   32 k
 perl-Data-Dumper        x86_64  2.174-462.el9        rhel-9-for-x86_64-appstream-beta-rpms   58 k
 perl-Digest             noarch  1.19-4.el9           rhel-9-for-x86_64-appstream-beta-rpms   28 k
 perl-Digest-MD5         x86_64  2.58-4.el9           rhel-9-for-x86_64-appstream-beta-rpms   39 k
 perl-DynaLoader         x86_64  1.47-479.el9         rhel-9-for-x86_64-appstream-beta-rpms   35 k
 perl-Encode             x86_64  4:3.08-462.el9       rhel-9-for-x86_64-appstream-beta-rpms  1.7 M
 perl-Errno              x86_64  1.30-479.el9         rhel-9-for-x86_64-appstream-beta-rpms   24 k
 perl-Error              noarch  1:0.17029-7.el9      rhel-9-for-x86_64-appstream-beta-rpms   46 k
 perl-Exporter           noarch  5.74-461.el9         rhel-9-for-x86_64-appstream-beta-rpms   33 k
 perl-Fcntl              x86_64  1.13-479.el9         rhel-9-for-x86_64-appstream-beta-rpms   31 k
 perl-File-Basename      noarch  2.85-479.el9         rhel-9-for-x86_64-appstream-beta-rpms   27 k
 perl-File-Find          noarch  1.37-479.el9         rhel-9-for-x86_64-appstream-beta-rpms   35 k
 perl-File-Path          noarch  2.18-4.el9           rhel-9-for-x86_64-appstream-beta-rpms   37 k
 perl-File-Temp          noarch  1:0.231.100-4.el9    rhel-9-for-x86_64-appstream-beta-rpms   62 k
 perl-File-stat          noarch  1.09-479.el9         rhel-9-for-x86_64-appstream-beta-rpms   27 k
 perl-FileHandle         noarch  2.03-479.el9         rhel-9-for-x86_64-appstream-beta-rpms   25 k
 perl-Getopt-Long        noarch  1:2.52-4.el9         rhel-9-for-x86_64-appstream-beta-rpms   63 k
 perl-Getopt-Std         noarch  1.12-479.el9         rhel-9-for-x86_64-appstream-beta-rpms   25 k
 perl-Git                noarch  2.31.1-2.el9.2       rhel-9-for-x86_64-appstream-beta-rpms   44 k
 perl-HTTP-Tiny          noarch  0.076-460.el9        rhel-9-for-x86_64-appstream-beta-rpms   57 k
 perl-IO                 x86_64  1.43-479.el9         rhel-9-for-x86_64-appstream-beta-rpms  102 k
 perl-IPC-Open3          noarch  1.21-479.el9         rhel-9-for-x86_64-appstream-beta-rpms   33 k
 perl-MIME-Base64        x86_64  3.16-4.el9           rhel-9-for-x86_64-appstream-beta-rpms   34 k
 perl-Net-SSLeay         x86_64  1.90-8.el9           rhel-9-for-x86_64-appstream-beta-rpms  377 k
 perl-POSIX              x86_64  1.94-479.el9         rhel-9-for-x86_64-appstream-beta-rpms  107 k
 perl-PathTools          x86_64  3.78-461.el9         rhel-9-for-x86_64-appstream-beta-rpms   92 k
 perl-Pod-Escapes        noarch  1:1.07-460.el9       rhel-9-for-x86_64-appstream-beta-rpms   21 k
 perl-Pod-Perldoc        noarch  3.28.01-461.el9      rhel-9-for-x86_64-appstream-beta-rpms   91 k
 perl-Pod-Simple         noarch  1:3.42-4.el9         rhel-9-for-x86_64-appstream-beta-rpms  228 k
 perl-Pod-Usage          noarch  4:2.01-4.el9         rhel-9-for-x86_64-appstream-beta-rpms   43 k
 perl-Scalar-List-Utils  x86_64  4:1.56-461.el9       rhel-9-for-x86_64-appstream-beta-rpms   76 k
 perl-SelectSaver        noarch  1.02-479.el9         rhel-9-for-x86_64-appstream-beta-rpms   21 k
 perl-Socket             x86_64  4:2.031-4.el9        rhel-9-for-x86_64-appstream-beta-rpms   58 k
 perl-Storable           x86_64  1:3.21-460.el9       rhel-9-for-x86_64-appstream-beta-rpms   97 k
 perl-Symbol             noarch  1.08-479.el9         rhel-9-for-x86_64-appstream-beta-rpms   24 k
 perl-Term-ANSIColor     noarch  5.01-461.el9         rhel-9-for-x86_64-appstream-beta-rpms   50 k
 perl-Term-Cap           noarch  1.17-460.el9         rhel-9-for-x86_64-appstream-beta-rpms   24 k
 perl-TermReadKey        x86_64  2.38-11.el9          rhel-9-for-x86_64-appstream-beta-rpms   40 k
 perl-Text-ParseWords    noarch  3.30-460.el9         rhel-9-for-x86_64-appstream-beta-rpms   18 k
 perl-Text-Tabs+Wrap     noarch  2013.0523-460.el9    rhel-9-for-x86_64-appstream-beta-rpms   25 k
 perl-Time-Local         noarch  2:1.300-7.el9        rhel-9-for-x86_64-appstream-beta-rpms   36 k
 perl-URI                noarch  5.09-3.el9           rhel-9-for-x86_64-appstream-beta-rpms  125 k
 perl-base               noarch  2.27-479.el9         rhel-9-for-x86_64-appstream-beta-rpms   26 k
 perl-constant           noarch  1.33-461.el9         rhel-9-for-x86_64-appstream-beta-rpms   25 k
 perl-if                 noarch  0.60.800-479.el9     rhel-9-for-x86_64-appstream-beta-rpms   23 k
 perl-interpreter        x86_64  4:5.32.1-479.el9     rhel-9-for-x86_64-appstream-beta-rpms   83 k
 perl-lib                x86_64  0.65-479.el9         rhel-9-for-x86_64-appstream-beta-rpms   24 k
 perl-libnet             noarch  3.13-4.el9           rhel-9-for-x86_64-appstream-beta-rpms  134 k
 perl-libs               x86_64  4:5.32.1-479.el9     rhel-9-for-x86_64-appstream-beta-rpms  2.2 M
 perl-mro                x86_64  1.23-479.el9         rhel-9-for-x86_64-appstream-beta-rpms   39 k
 perl-overload           noarch  1.31-479.el9         rhel-9-for-x86_64-appstream-beta-rpms   55 k
 perl-overloading        noarch  0.02-479.el9         rhel-9-for-x86_64-appstream-beta-rpms   23 k
 perl-parent             noarch  1:0.238-460.el9      rhel-9-for-x86_64-appstream-beta-rpms   15 k
 perl-podlators          noarch  1:4.14-460.el9       rhel-9-for-x86_64-appstream-beta-rpms  118 k
 perl-subs               noarch  1.03-479.el9         rhel-9-for-x86_64-appstream-beta-rpms   21 k
 perl-vars               noarch  1.05-479.el9         rhel-9-for-x86_64-appstream-beta-rpms   22 k
 python3-babel           noarch  2.9.1-2.el9          rhel-9-for-x86_64-appstream-beta-rpms  6.0 M
 python3-cffi            x86_64  1.14.5-4.el9         rhel-9-for-x86_64-appstream-beta-rpms  257 k
 python3-cryptography    x86_64  3.4.7-5.el9          rhel-9-for-x86_64-appstream-beta-rpms  784 k
 python3-jinja2          noarch  2.11.3-4.el9         rhel-9-for-x86_64-appstream-beta-rpms  253 k
 python3-markupsafe      x86_64  1.1.1-12.el9         rhel-9-for-x86_64-appstream-beta-rpms   38 k
 python3-packaging       noarch  20.9-4.el9           rhel-9-for-x86_64-appstream-beta-rpms   81 k
 python3-ply             noarch  3.11-13.el9          rhel-9-for-x86_64-appstream-beta-rpms  110 k
 python3-pycparser       noarch  2.20-5.el9           rhel-9-for-x86_64-appstream-beta-rpms  139 k
 python3-pyparsing       noarch  2.4.7-7.1.el9        rhel-9-for-x86_64-baseos-beta-rpms     154 k
 python3-pytz            noarch  2021.1-4.el9         rhel-9-for-x86_64-appstream-beta-rpms   56 k
 python3-resolvelib      noarch  0.5.4-5.el9          rhel-9-for-x86_64-appstream-beta-rpms   38 k
 sshpass                 x86_64  1.09-4.el9           rhel-9-for-x86_64-appstream-beta-rpms   29 k
Installing weak dependencies:
 perl-IO-Socket-IP       noarch  0.41-5.el9           rhel-9-for-x86_64-appstream-beta-rpms   45 k
 perl-IO-Socket-SSL      noarch  2.070-6.el9          rhel-9-for-x86_64-appstream-beta-rpms  217 k
 perl-Mozilla-CA         noarch  20200520-6.el9       rhel-9-for-x86_64-appstream-beta-rpms   14 k
 perl-NDBM_File          x86_64  1.15-479.el9         rhel-9-for-x86_64-appstream-beta-rpms   33 k
Transaction Summary
===================================================================================================
Install  79 Packages
Total download size: 24 M
Installed size: 101 M
Is this ok [y/N]: y
Downloading Packages:
(1/79): perl-IPC-Open3-1.21-479.el9.noarch.rpm                      51 kB/s |  33 kB     00:00    
(2/79): perl-libnet-3.13-4.el9.noarch.rpm                          193 kB/s | 134 kB     00:00    
(3/79): python3-pyparsing-2.4.7-7.1.el9.noarch.rpm                 221 kB/s | 154 kB     00:00    
(4/79): perl-File-Basename-2.85-479.el9.noarch.rpm                 160 kB/s |  27 kB     00:00    
(5/79): perl-Text-ParseWords-3.30-460.el9.noarch.rpm               113 kB/s |  18 kB     00:00    
(6/79): perl-Pod-Perldoc-3.28.01-461.el9.noarch.rpm                516 kB/s |  91 kB     00:00    
(7/79): python3-pytz-2021.1-4.el9.noarch.rpm                       283 kB/s |  56 kB     00:00    
(8/79): perl-Getopt-Long-2.52-4.el9.noarch.rpm                     368 kB/s |  63 kB     00:00    
(9/79): perl-IO-Socket-SSL-2.070-6.el9.noarch.rpm                  918 kB/s | 217 kB     00:00    
(10/79): perl-Class-Struct-0.66-479.el9.noarch.rpm                 173 kB/s |  32 kB     00:00    
(11/79): perl-File-Find-1.37-479.el9.noarch.rpm                    214 kB/s |  35 kB     00:00    
(12/79): perl-Digest-1.19-4.el9.noarch.rpm                         137 kB/s |  28 kB     00:00    
(13/79): perl-Mozilla-CA-20200520-6.el9.noarch.rpm                  77 kB/s |  14 kB     00:00    
(14/79): perl-overload-1.31-479.el9.noarch.rpm                     309 kB/s |  55 kB     00:00    
(15/79): perl-Term-Cap-1.17-460.el9.noarch.rpm                      80 kB/s |  24 kB     00:00    
(16/79): perl-if-0.60.800-479.el9.noarch.rpm                       101 kB/s |  23 kB     00:00    
(17/79): perl-parent-0.238-460.el9.noarch.rpm                       28 kB/s |  15 kB     00:00    
(18/79): git-core-doc-2.31.1-2.el9.2.noarch.rpm                    3.8 MB/s | 2.5 MB     00:00    
(19/79): perl-File-stat-1.09-479.el9.noarch.rpm                    145 kB/s |  27 kB     00:00    
(20/79): perl-Term-ANSIColor-5.01-461.el9.noarch.rpm               294 kB/s |  50 kB     00:00    
(21/79): perl-subs-1.03-479.el9.noarch.rpm                         117 kB/s |  21 kB     00:00    
(22/79): perl-HTTP-Tiny-0.076-460.el9.noarch.rpm                   327 kB/s |  57 kB     00:00    
(23/79): perl-SelectSaver-1.02-479.el9.noarch.rpm                  109 kB/s |  21 kB     00:00    
(24/79): perl-Error-0.17029-7.el9.noarch.rpm                       152 kB/s |  46 kB     00:00    
(25/79): perl-Exporter-5.74-461.el9.noarch.rpm                     168 kB/s |  33 kB     00:00    
(26/79): perl-Symbol-1.08-479.el9.noarch.rpm                        61 kB/s |  24 kB     00:00    
(27/79): perl-overloading-0.02-479.el9.noarch.rpm                  134 kB/s |  23 kB     00:00    
(28/79): perl-vars-1.05-479.el9.noarch.rpm                          26 kB/s |  22 kB     00:00    
(29/79): perl-Carp-1.50-460.el9.noarch.rpm                          38 kB/s |  31 kB     00:00    
(30/79): perl-Fcntl-1.13-479.el9.x86_64.rpm                        181 kB/s |  31 kB     00:00    
(31/79): perl-File-Temp-0.231.100-4.el9.noarch.rpm                 348 kB/s |  62 kB     00:00    
(32/79): perl-File-Path-2.18-4.el9.noarch.rpm                      140 kB/s |  37 kB     00:00    
(33/79): perl-AutoLoader-5.74-479.el9.noarch.rpm                   109 kB/s |  31 kB     00:00    
(34/79): perl-Pod-Simple-3.42-4.el9.noarch.rpm                     774 kB/s | 228 kB     00:00    
(35/79): perl-Git-2.31.1-2.el9.2.noarch.rpm                        164 kB/s |  44 kB     00:00    
(36/79): perl-Pod-Escapes-1.07-460.el9.noarch.rpm                   33 kB/s |  21 kB     00:00    
(37/79): python3-ply-3.11-13.el9.noarch.rpm                        160 kB/s | 110 kB     00:00    
(38/79): perl-IO-Socket-IP-0.41-5.el9.noarch.rpm                   206 kB/s |  45 kB     00:00    
(39/79): perl-FileHandle-2.03-479.el9.noarch.rpm                   120 kB/s |  25 kB     00:00    
(40/79): perl-Text-Tabs+Wrap-2013.0523-460.el9.noarch.rpm          137 kB/s |  25 kB     00:00    
(41/79): python3-pycparser-2.20-5.el9.noarch.rpm                   778 kB/s | 139 kB     00:00    
(42/79): perl-constant-1.33-461.el9.noarch.rpm                     105 kB/s |  25 kB     00:00    
(43/79): perl-URI-5.09-3.el9.noarch.rpm                            445 kB/s | 125 kB     00:00    
(44/79): python3-jinja2-2.11.3-4.el9.noarch.rpm                    990 kB/s | 253 kB     00:00    
(45/79): perl-Time-Local-1.300-7.el9.noarch.rpm                    204 kB/s |  36 kB     00:00    
(46/79): perl-Pod-Usage-2.01-4.el9.noarch.rpm                      103 kB/s |  43 kB     00:00    
(47/79): python3-resolvelib-0.5.4-5.el9.noarch.rpm                  22 kB/s |  38 kB     00:01    
(48/79): perl-base-2.27-479.el9.noarch.rpm                          41 kB/s |  26 kB     00:00    
(49/79): perl-podlators-4.14-460.el9.noarch.rpm                    407 kB/s | 118 kB     00:00    
(50/79): perl-Getopt-Std-1.12-479.el9.noarch.rpm                   142 kB/s |  25 kB     00:00    
(51/79): perl-mro-1.23-479.el9.x86_64.rpm                          158 kB/s |  39 kB     00:00    
(52/79): perl-Storable-3.21-460.el9.x86_64.rpm                     525 kB/s |  97 kB     00:00    
(53/79): python3-babel-2.9.1-2.el9.noarch.rpm                      4.3 MB/s | 6.0 MB     00:01    
(54/79): perl-IO-1.43-479.el9.x86_64.rpm                           623 kB/s | 102 kB     00:00    
(55/79): perl-Scalar-List-Utils-1.56-461.el9.x86_64.rpm            423 kB/s |  76 kB     00:00    
(56/79): perl-Net-SSLeay-1.90-8.el9.x86_64.rpm                     1.7 MB/s | 377 kB     00:00    
(57/79): perl-interpreter-5.32.1-479.el9.x86_64.rpm                376 kB/s |  83 kB     00:00    
(58/79): python3-markupsafe-1.1.1-12.el9.x86_64.rpm                220 kB/s |  38 kB     00:00    
(59/79): perl-Errno-1.30-479.el9.x86_64.rpm                        129 kB/s |  24 kB     00:00    
(60/79): perl-Digest-MD5-2.58-4.el9.x86_64.rpm                     238 kB/s |  39 kB     00:00    
(61/79): perl-lib-0.65-479.el9.x86_64.rpm                           69 kB/s |  24 kB     00:00    
(62/79): python3-packaging-20.9-4.el9.noarch.rpm                    46 kB/s |  81 kB     00:01    
(63/79): perl-TermReadKey-2.38-11.el9.x86_64.rpm                   203 kB/s |  40 kB     00:00    
(64/79): perl-Socket-2.031-4.el9.x86_64.rpm                        312 kB/s |  58 kB     00:00    
(65/79): perl-NDBM_File-1.15-479.el9.x86_64.rpm                     81 kB/s |  33 kB     00:00    
(66/79): perl-Encode-3.08-462.el9.x86_64.rpm                       2.5 MB/s | 1.7 MB     00:00    
(67/79): sshpass-1.09-4.el9.x86_64.rpm                              19 kB/s |  29 kB     00:01    
(68/79): perl-libs-5.32.1-479.el9.x86_64.rpm                       3.0 MB/s | 2.2 MB     00:00    
(69/79): perl-B-1.80-479.el9.x86_64.rpm                            768 kB/s | 193 kB     00:00    
(70/79): perl-PathTools-3.78-461.el9.x86_64.rpm                    504 kB/s |  92 kB     00:00    
(71/79): perl-POSIX-1.94-479.el9.x86_64.rpm                        158 kB/s | 107 kB     00:00    
(72/79): perl-MIME-Base64-3.16-4.el9.x86_64.rpm                     90 kB/s |  34 kB     00:00    
(73/79): perl-Data-Dumper-2.174-462.el9.x86_64.rpm                 222 kB/s |  58 kB     00:00    
(74/79): git-core-2.31.1-2.el9.2.x86_64.rpm                        3.3 MB/s | 3.6 MB     00:01    
(75/79): git-2.31.1-2.el9.2.x86_64.rpm                             656 kB/s | 128 kB     00:00    
(76/79): perl-DynaLoader-1.47-479.el9.x86_64.rpm                   213 kB/s |  35 kB     00:00    
(77/79): ansible-core-2.12.1-1.el9.x86_64.rpm                      3.7 MB/s | 2.4 MB     00:00    
(78/79): python3-cffi-1.14.5-4.el9.x86_64.rpm                      127 kB/s | 257 kB     00:02    
(79/79): python3-cryptography-3.4.7-5.el9.x86_64.rpm               367 kB/s | 784 kB     00:02    
---------------------------------------------------------------------------------------------------
Total                                                              2.0 MB/s |  24 MB     00:12     
Red Hat Enterprise Linux 9 for x86_64 - BaseOS Beta (RPMs)         1.3 MB/s | 1.6 kB     00:00    
Importing GPG key 0xF21541EB:
 Userid     : "Red Hat, Inc. (beta key 2) <[email protected]>"
 Fingerprint: B08B 659E E86A F623 BC90 E8DB 938A 80CA F215 41EB
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta
Is this ok [y/N]: y
Key imported successfully
Red Hat Enterprise Linux 9 for x86_64 - BaseOS Beta (RPMs)         4.9 MB/s | 5.0 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 0xD4082792:
 Userid     : "Red Hat, Inc. (auxiliary key) <[email protected]>"
 Fingerprint: 6A6A A7C9 7C88 90AE C6AE BFE2 F76F 66C3 D408 2792
 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/79 
  Installing       : git-core-doc-2.31.1-2.el9.2.noarch                                       2/79 
  Installing       : perl-Digest-1.19-4.el9.noarch                                            3/79 
  Installing       : perl-FileHandle-2.03-479.el9.noarch                                      4/79 
  Installing       : perl-Digest-MD5-2.58-4.el9.x86_64                                        5/79 
  Installing       : perl-B-1.80-479.el9.x86_64                                               6/79 
  Installing       : perl-AutoLoader-5.74-479.el9.noarch                                      7/79 
  Installing       : perl-Data-Dumper-2.174-462.el9.x86_64                                    8/79 
  Installing       : perl-libnet-3.13-4.el9.noarch                                            9/79 
  Installing       : perl-base-2.27-479.el9.noarch                                           10/79 
  Installing       : perl-Net-SSLeay-1.90-8.el9.x86_64                                       11/79 
  Installing       : perl-URI-5.09-3.el9.noarch                                              12/79 
  Installing       : perl-if-0.60.800-479.el9.noarch                                         13/79 
  Installing       : perl-Pod-Escapes-1:1.07-460.el9.noarch                                  14/79 
  Installing       : perl-Text-Tabs+Wrap-2013.0523-460.el9.noarch                            15/79 
  Installing       : perl-Time-Local-2:1.300-7.el9.noarch                                    16/79 
  Installing       : perl-Mozilla-CA-20200520-6.el9.noarch                                   17/79 
  Installing       : perl-File-Path-2.18-4.el9.noarch                                        18/79 
  Installing       : perl-IO-Socket-IP-0.41-5.el9.noarch                                     19/79 
  Installing       : perl-IO-Socket-SSL-2.070-6.el9.noarch                                   20/79 
  Installing       : perl-subs-1.03-479.el9.noarch                                           21/79 
  Installing       : perl-Class-Struct-0.66-479.el9.noarch                                   22/79 
  Installing       : perl-Term-ANSIColor-5.01-461.el9.noarch                                 23/79 
  Installing       : perl-Term-Cap-1.17-460.el9.noarch                                       24/79 
  Installing       : perl-POSIX-1.94-479.el9.x86_64                                          25/79 
  Installing       : perl-Pod-Simple-1:3.42-4.el9.noarch                                     26/79 
  Installing       : perl-IPC-Open3-1.21-479.el9.noarch                                      27/79 
  Installing       : perl-File-Temp-1:0.231.100-4.el9.noarch                                 28/79 
  Installing       : perl-HTTP-Tiny-0.076-460.el9.noarch                                     29/79 
  Installing       : perl-SelectSaver-1.02-479.el9.noarch                                    30/79 
  Installing       : perl-Symbol-1.08-479.el9.noarch                                         31/79 
  Installing       : perl-File-stat-1.09-479.el9.noarch                                      32/79 
  Installing       : perl-Socket-4:2.031-4.el9.x86_64                                        33/79 
  Installing       : perl-podlators-1:4.14-460.el9.noarch                                    34/79 
  Installing       : perl-Pod-Perldoc-3.28.01-461.el9.noarch                                 35/79 
  Installing       : perl-Text-ParseWords-3.30-460.el9.noarch                                36/79 
  Installing       : perl-overloading-0.02-479.el9.noarch                                    37/79 
  Installing       : perl-Fcntl-1.13-479.el9.x86_64                                          38/79 
  Installing       : perl-mro-1.23-479.el9.x86_64                                            39/79 
  Installing       : perl-IO-1.43-479.el9.x86_64                                             40/79 
  Installing       : perl-Pod-Usage-4:2.01-4.el9.noarch                                      41/79 
  Installing       : perl-parent-1:0.238-460.el9.noarch                                      42/79 
  Installing       : perl-File-Basename-2.85-479.el9.noarch                                  43/79 
  Installing       : perl-vars-1.05-479.el9.noarch                                           44/79 
  Installing       : perl-constant-1.33-461.el9.noarch                                       45/79 
  Installing       : perl-Getopt-Std-1.12-479.el9.noarch                                     46/79 
  Installing       : perl-overload-1.31-479.el9.noarch                                       47/79 
  Installing       : perl-Scalar-List-Utils-4:1.56-461.el9.x86_64                            48/79 
  Installing       : perl-Errno-1.30-479.el9.x86_64                                          49/79 
  Installing       : perl-Storable-1:3.21-460.el9.x86_64                                     50/79 
  Installing       : perl-MIME-Base64-3.16-4.el9.x86_64                                      51/79 
  Installing       : perl-Getopt-Long-1:2.52-4.el9.noarch                                    52/79 
  Installing       : perl-Exporter-5.74-461.el9.noarch                                       53/79 
  Installing       : perl-Carp-1.50-460.el9.noarch                                           54/79 
  Installing       : perl-NDBM_File-1.15-479.el9.x86_64                                      55/79 
  Installing       : perl-PathTools-3.78-461.el9.x86_64                                      56/79 
  Installing       : perl-Encode-4:3.08-462.el9.x86_64                                       57/79 
  Installing       : perl-libs-4:5.32.1-479.el9.x86_64                                       58/79 
  Installing       : perl-interpreter-4:5.32.1-479.el9.x86_64                                59/79 
  Installing       : perl-File-Find-1.37-479.el9.noarch                                      60/79 
  Installing       : perl-Error-1:0.17029-7.el9.noarch                                       61/79 
  Installing       : perl-lib-0.65-479.el9.x86_64                                            62/79 
  Installing       : perl-DynaLoader-1.47-479.el9.x86_64                                     63/79 
  Installing       : perl-TermReadKey-2.38-11.el9.x86_64                                     64/79 
  Installing       : perl-Git-2.31.1-2.el9.2.noarch                                          65/79 
  Installing       : git-2.31.1-2.el9.2.x86_64                                               66/79 
  Installing       : sshpass-1.09-4.el9.x86_64                                               67/79 
  Installing       : python3-markupsafe-1.1.1-12.el9.x86_64                                  68/79 
  Installing       : python3-resolvelib-0.5.4-5.el9.noarch                                   69/79 
  Installing       : python3-ply-3.11-13.el9.noarch                                          70/79 
  Installing       : python3-pycparser-2.20-5.el9.noarch                                     71/79 
  Installing       : python3-cffi-1.14.5-4.el9.x86_64                                        72/79 
  Installing       : python3-cryptography-3.4.7-5.el9.x86_64                                 73/79 
  Installing       : python3-pytz-2021.1-4.el9.noarch                                        74/79 
  Installing       : python3-babel-2.9.1-2.el9.noarch                                        75/79 
  Installing       : python3-jinja2-2.11.3-4.el9.noarch                                      76/79 
  Installing       : python3-pyparsing-2.4.7-7.1.el9.noarch                                  77/79 
  Installing       : python3-packaging-20.9-4.el9.noarch                                     78/79 
  Installing       : ansible-core-2.12.1-1.el9.x86_64                                        79/79 
  Running scriptlet: ansible-core-2.12.1-1.el9.x86_64                                        79/79 
  Verifying        : python3-pyparsing-2.4.7-7.1.el9.noarch                                   1/79 
  Verifying        : perl-libnet-3.13-4.el9.noarch                                            2/79 
  Verifying        : perl-IPC-Open3-1.21-479.el9.noarch                                       3/79 
  Verifying        : perl-File-Basename-2.85-479.el9.noarch                                   4/79 
  Verifying        : perl-Text-ParseWords-3.30-460.el9.noarch                                 5/79 
  Verifying        : perl-Pod-Perldoc-3.28.01-461.el9.noarch                                  6/79 
  Verifying        : python3-pytz-2021.1-4.el9.noarch                                         7/79 
  Verifying        : perl-IO-Socket-SSL-2.070-6.el9.noarch                                    8/79 
  Verifying        : perl-Getopt-Long-1:2.52-4.el9.noarch                                     9/79 
  Verifying        : perl-Class-Struct-0.66-479.el9.noarch                                   10/79 
  Verifying        : perl-File-Find-1.37-479.el9.noarch                                      11/79 
  Verifying        : perl-Digest-1.19-4.el9.noarch                                           12/79 
  Verifying        : perl-Mozilla-CA-20200520-6.el9.noarch                                   13/79 
  Verifying        : perl-overload-1.31-479.el9.noarch                                       14/79 
  Verifying        : git-core-doc-2.31.1-2.el9.2.noarch                                      15/79 
  Verifying        : perl-Term-Cap-1.17-460.el9.noarch                                       16/79 
  Verifying        : perl-parent-1:0.238-460.el9.noarch                                      17/79 
  Verifying        : perl-if-0.60.800-479.el9.noarch                                         18/79 
  Verifying        : perl-File-stat-1.09-479.el9.noarch                                      19/79 
  Verifying        : perl-Term-ANSIColor-5.01-461.el9.noarch                                 20/79 
  Verifying        : perl-subs-1.03-479.el9.noarch                                           21/79 
  Verifying        : perl-Error-1:0.17029-7.el9.noarch                                       22/79 
  Verifying        : perl-HTTP-Tiny-0.076-460.el9.noarch                                     23/79 
  Verifying        : perl-SelectSaver-1.02-479.el9.noarch                                    24/79 
  Verifying        : perl-Exporter-5.74-461.el9.noarch                                       25/79 
  Verifying        : perl-vars-1.05-479.el9.noarch                                           26/79 
  Verifying        : perl-Carp-1.50-460.el9.noarch                                           27/79 
  Verifying        : perl-Symbol-1.08-479.el9.noarch                                         28/79 
  Verifying        : perl-overloading-0.02-479.el9.noarch                                    29/79 
  Verifying        : perl-Fcntl-1.13-479.el9.x86_64                                          30/79 
  Verifying        : perl-AutoLoader-5.74-479.el9.noarch                                     31/79 
  Verifying        : perl-File-Temp-1:0.231.100-4.el9.noarch                                 32/79 
  Verifying        : perl-File-Path-2.18-4.el9.noarch                                        33/79 
  Verifying        : perl-Pod-Simple-1:3.42-4.el9.noarch                                     34/79 
  Verifying        : perl-Pod-Escapes-1:1.07-460.el9.noarch                                  35/79 
  Verifying        : python3-ply-3.11-13.el9.noarch                                          36/79 
  Verifying        : perl-Git-2.31.1-2.el9.2.noarch                                          37/79 
  Verifying        : python3-resolvelib-0.5.4-5.el9.noarch                                   38/79 
  Verifying        : perl-IO-Socket-IP-0.41-5.el9.noarch                                     39/79 
  Verifying        : perl-FileHandle-2.03-479.el9.noarch                                     40/79 
  Verifying        : perl-Text-Tabs+Wrap-2013.0523-460.el9.noarch                            41/79 
  Verifying        : python3-pycparser-2.20-5.el9.noarch                                     42/79 
  Verifying        : perl-constant-1.33-461.el9.noarch                                       43/79 
  Verifying        : perl-URI-5.09-3.el9.noarch                                              44/79 
  Verifying        : python3-jinja2-2.11.3-4.el9.noarch                                      45/79 
  Verifying        : perl-Pod-Usage-4:2.01-4.el9.noarch                                      46/79 
  Verifying        : perl-Time-Local-2:1.300-7.el9.noarch                                    47/79 
  Verifying        : python3-babel-2.9.1-2.el9.noarch                                        48/79 
  Verifying        : perl-base-2.27-479.el9.noarch                                           49/79 
  Verifying        : perl-podlators-1:4.14-460.el9.noarch                                    50/79 
  Verifying        : perl-Getopt-Std-1.12-479.el9.noarch                                     51/79 
  Verifying        : python3-packaging-20.9-4.el9.noarch                                     52/79 
  Verifying        : perl-mro-1.23-479.el9.x86_64                                            53/79 
  Verifying        : perl-Storable-1:3.21-460.el9.x86_64                                     54/79 
  Verifying        : perl-IO-1.43-479.el9.x86_64                                             55/79 
  Verifying        : perl-Scalar-List-Utils-4:1.56-461.el9.x86_64                            56/79 
  Verifying        : perl-Net-SSLeay-1.90-8.el9.x86_64                                       57/79 
  Verifying        : perl-interpreter-4:5.32.1-479.el9.x86_64                                58/79 
  Verifying        : python3-markupsafe-1.1.1-12.el9.x86_64                                  59/79 
  Verifying        : perl-Errno-1.30-479.el9.x86_64                                          60/79 
  Verifying        : perl-Digest-MD5-2.58-4.el9.x86_64                                       61/79 
  Verifying        : sshpass-1.09-4.el9.x86_64                                               62/79 
  Verifying        : perl-lib-0.65-479.el9.x86_64                                            63/79 
  Verifying        : perl-TermReadKey-2.38-11.el9.x86_64                                     64/79 
  Verifying        : perl-Socket-4:2.031-4.el9.x86_64                                        65/79 
  Verifying        : perl-NDBM_File-1.15-479.el9.x86_64                                      66/79 
  Verifying        : perl-Encode-4:3.08-462.el9.x86_64                                       67/79 
  Verifying        : perl-libs-4:5.32.1-479.el9.x86_64                                       68/79 
  Verifying        : perl-POSIX-1.94-479.el9.x86_64                                          69/79 
  Verifying        : perl-B-1.80-479.el9.x86_64                                              70/79 
  Verifying        : git-core-2.31.1-2.el9.2.x86_64                                          71/79 
  Verifying        : perl-PathTools-3.78-461.el9.x86_64                                      72/79 
  Verifying        : perl-MIME-Base64-3.16-4.el9.x86_64                                      73/79 
  Verifying        : python3-cffi-1.14.5-4.el9.x86_64                                        74/79 
  Verifying        : perl-Data-Dumper-2.174-462.el9.x86_64                                   75/79 
  Verifying        : git-2.31.1-2.el9.2.x86_64                                               76/79 
  Verifying        : python3-cryptography-3.4.7-5.el9.x86_64                                 77/79 
  Verifying        : perl-DynaLoader-1.47-479.el9.x86_64                                     78/79 
  Verifying        : ansible-core-2.12.1-1.el9.x86_64                                        79/79 
Installed products updated.
Installed:
  ansible-core-2.12.1-1.el9.x86_64                 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.070-6.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.90-8.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-4.el9.x86_64                 python3-cryptography-3.4.7-5.el9.x86_64         
  python3-jinja2-2.11.3-4.el9.noarch               python3-markupsafe-1.1.1-12.el9.x86_64          
  python3-packaging-20.9-4.el9.noarch              python3-ply-3.11-13.el9.noarch                  
  python3-pycparser-2.20-5.el9.noarch              python3-pyparsing-2.4.7-7.1.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 devops]# ansible --version
ansible [core 2.12.1]
  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 = /bin/ansible
  python version = 3.9.9 (main, Nov 22 2021, 00:00:00) [GCC 11.2.1 20211019 (Red Hat 11.2.1-6)]
  jinja version = 2.11.3
  libyaml = True
[root@localhost devops]# dnf info ansible-core
Updating Subscription Management repositories.
Last metadata expiration check: 1:42:32 ago on Fri 21 Jan 2022 04:15:49 PM CET.
Installed Packages
Name         : ansible-core
Version      : 2.12.1
Release      : 1.el9
Architecture : x86_64
Size         : 9.3 M
Source       : ansible-core-2.12.1-1.el9.src.rpm
Repository   : @System
From repo    : rhel-9-for-x86_64-appstream-beta-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.
[root@localhost devops]#

before execution

# dnf info ansible-core
Updating Subscription Management repositories.
Last metadata expiration check: 1:41:06 ago on Fri 21 Jan 2022 04:15:49 PM CET.
Available Packages
Name         : ansible-core
Version      : 2.12.1
Release      : 1.el9
Architecture : x86_64
Size         : 2.4 M
Source       : ansible-core-2.12.1-1.el9.src.rpm
Repository   : rhel-9-for-x86_64-appstream-beta-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.
[root@localhost devops]#

after execution

# dnf info ansible-core
Updating Subscription Management repositories.
Last metadata expiration check: 1:42:32 ago on Fri 21 Jan 2022 04:15:49 PM CET.
Installed Packages
Name         : ansible-core
Version      : 2.12.1
Release      : 1.el9
Architecture : x86_64
Size         : 9.3 M
Source       : ansible-core-2.12.1-1.el9.src.rpm
Repository   : @System
From repo    : rhel-9-for-x86_64-appstream-beta-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.
[root@localhost devops]#

code with ❤️ in GitHub

Conclusion

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 Udemy 300+ Lessons Video Course.

BUY the Complete Udemy 300+ Lessons Video Course

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

Patreon Buy me a Pizza