How to install Ansible in AlmaLinux version 9.

Today we’re going to talk about the easier way to install and maintain Ansible inside AlmaLinux 9 using the appstream system repository.

I’m Luca Berton and welcome to today’s episode of Ansible Pilot.

How to install Ansible in AlmaLinux 9

  • ansible-core included in AppStream repository
  • ansible package not available

Today we’re talking about How to install Ansible in AlmaLinux 9.

The easier way to install and maintain up-to-date Ansible inside AlmaLinux version 9 is using the ansible-core package included in the AppStream distribution repository.

Please notice that the package ansible isn’t available anymore.

It’s not necessary to use the additional EPEL package repository.

See also:

[Ansible terminology - ansible vs ansible-core packages](/articles/ansible-terminology-ansible-vs-ansible-core-packages).

Links

  • [AlmaLinux website](https://almalinux.org/)

Playbook

Let’s jump into a quick live Playbook of how to install the latest version of Ansible in AlmaLinux.

I’m going to install the ansible-core package in an AlmaLinux 9 using the AppStream distribution repository.

code

  • Install-Ansible-AlmaLinux9.sh

``bash

#!/bin/bash

sudo yum install ansible-core

`

execution

``bash

$ ssh [email protected]

[devops@almalinux ~]$ sudo su

[root@almalinux devops]# cat /etc/redhat-release

AlmaLinux release 9.0 (Emerald Puma)

[root@almalinux devops]# cat /etc/os-release

NAME="AlmaLinux"

VERSION="9.0 (Emerald Puma)"

ID="almalinux"

ID_LIKE="rhel centos fedora"

VERSION_ID="9.0"

PLATFORM_ID="platform:el9"

PRETTY_NAME="AlmaLinux 9.0 (Emerald Puma)"

ANSI_COLOR="0;34"

LOGO="fedora-logo-icon"

CPE_NAME="cpe:/o:almalinux:almalinux:9::baseos"

HOME_URL="https://almalinux.org/"

DOCUMENTATION_URL="https://wiki.almalinux.org/"

BUG_REPORT_URL="https://bugs.almalinux.org/"

ALMALINUX_MANTISBT_PROJECT="AlmaLinux-9"

ALMALINUX_MANTISBT_PROJECT_VERSION="9.0"

REDHAT_SUPPORT_PRODUCT="AlmaLinux"

REDHAT_SUPPORT_PRODUCT_VERSION="9.0"

[root@almalinux devops]# hostnamectl

Static hostname: almalinux.example.com

Icon name: computer-vm

Chassis: vm 🖴

Machine ID: 4a8ab0349b874d1b8294222deebd0f8e

Boot ID: 3616b69bcbf8433d8d4e9eaa826dee67

Virtualization: oracle

Operating System: AlmaLinux 9.0 (Emerald Puma)

CPE OS Name: cpe:/o:almalinux:almalinux:9::baseos

Kernel: Linux 5.14.0-70.13.1.el9_0.x86_64

Architecture: x86-64

Hardware Vendor: innotek GmbH

Hardware Model: VirtualBox

[root@almalinux devops]# uname -a

Linux almalinux.example.com 5.14.0-70.13.1.el9_0.x86_64 #1 SMP PREEMPT Tue May 17 15:53:11 EDT 2022 x86_64 x86_64 x86_64 GNU/Linux

[root@almalinux devops]# dnf search ansible

Last metadata expiration check: 16:31:06 ago on Mon Jul 11 14:56:03 2022.

============================================================================== Name & Summary Matched: ansible ===============================================================