How to install Ansible in Fedora version 36.

Today we're going to talk about the easier way to install and maintain Ansible inside Fedora 36 using the system repository.

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

How to install Ansible in Fedora 36

Today we're talking about How to install Ansible in Fedora 36.

The good news is that Ansible is included in the default repository so you could install it simply with your usual package manager.

You could expect the latest version of Ansible in the updates repository.

At the moment is available the latest 2.12 for ansible-core and 5.7 for ansible.

See also:

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

## Playbook

Let's jump in a quick live Playbook of how to install the latest version of Ansible in Fedora.

code

  • install-Ansible-Fedora.sh

``bash

#!/bin/bash

$ sudo dnf list available ansible

$ sudo dnf install ansible

$ sudo "rpm -qa | grep ansible"

$ sudo dnf list ansible

`

execution

``bash

$ ssh [email protected]

[devops@fedora ~]$ sudo su

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

Fedora release 36 (Thirty Six)

[root@fedora devops]# hostnamectl

Static hostname: fedora.example.com

Icon name: computer-vm

Chassis: vm 🖴

Machine ID: 6a5acc6d28614718b9a00f1b3595bd9a

Boot ID: 34de0e3a106e4ec78870948a6fdf2018

Virtualization: oracle

Operating System: Fedora Linux 36 (Cloud Edition)

CPE OS Name: cpe:/o:fedoraproject:fedora:36

Kernel: Linux 5.17.5-300.fc36.x86_64

Architecture: x86-64

Hardware Vendor: innotek GmbH

Hardware Model: VirtualBox

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

NAME="Fedora Linux"

VERSION="36 (Cloud Edition)"

ID=fedora

VERSION_ID=36

VERSION_CODENAME=""

PLATFORM_ID="platform:f36"

PRETTY_NAME="Fedora Linux 36 (Cloud Edition)"

ANSI_COLOR="0;38;2;60;110;180"

LOGO=fedora-logo-icon

CPE_NAME="cpe:/o:fedoraproject:fedora:36"

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

DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f36/system-administrators-guide/"

SUPPORT_URL="https://ask.fedoraproject.org/"

BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Fedora"

REDHAT_BUGZILLA_PRODUCT_VERSION=36

REDHAT_SUPPORT_PRODUCT="Fedora"

REDHAT_SUPPORT_PRODUCT_VERSION=36

PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"

VARIANT="Cloud Edition"

VARIANT_ID=cloud

[root@fedora devops]# dnf list available ansible

Fedora 36 - x86_64 2.8 MB/s | 81 MB 00:29

Fedora 36 openh264 (From Cisco) - x86_64 1.4 kB/s | 2.5 kB 00:01

Fedora Modular 36 - x86_64 822 kB/s | 2.4 MB 00:02

Fedora 36 - x86_64 - Updates 1.9 MB/s | 13 MB 00:07

Fedora Modular 36 - x86_64 - Updates 921 kB/s