How to install Ansible in Fedora 38 - Ansible install
How to install and maintain the latest version of Ansible inside Fedora 38 using the system repository with a practical demo.


How to install Ansible in Fedora version 38.
Today we’re going to talk about the easier way to install and maintain Ansible inside Fedora 38 using the system repository.
I’m Luca Berton and welcome to today’s episode of Ansible Pilot.
How to install Ansible in Fedora 38
Today we’re talking about How to install Ansible in Fedora 38.
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.14.6 for ansible-core
and 7.6.0 for ansible
.
See also: Ansible terminology - ansible vs ansible-core packages.
The Best Resources For Ansible
Video Course
Printed Book
eBooks
- Ansible by Examples: 200+ Automation Examples For Linux and Windows System Administrator and DevOps
- Ansible For Windows By Examples: 50+ Automation Examples For Windows System Administrator And DevOps
- Ansible For Linux by Examples: 100+ Automation Examples For Linux System Administrator and DevOps
- Ansible Linux Filesystem By Examples: 40+ Automation Examples on Linux File and Directory Operation for Modern IT Infrastructure
- Ansible For Containers and Kubernetes By Examples: 20+ Automation Examples To Automate Containers, Kubernetes and OpenShift
- Ansible For Security by Examples: 100+ Automation Examples to Automate Security and Verify Compliance for IT Modern Infrastructure
- Ansible Tips and Tricks: 10+ Ansible Examples to Save Time and Automate More Tasks
- Ansible Linux Users & Groups By Examples: 20+ Automation Examples on Linux Users and Groups Operation for Modern IT Infrastructure
- Ansible For PostgreSQL by Examples: 10+ Examples To Automate Your PostgreSQL database
- Ansible For Amazon Web Services AWS By Examples: 10+ Examples To Automate Your AWS Modern Infrastructure
- Ansible Automation Platform By Example: A step-by-step guide for the most common user scenarios
demo
Let’s jump in a quick live demo of how to install the latest version of Ansible in Fedora.
code
- install-Ansible-Fedora.sh
#!/bin/bash
sudo dnf update
sudo dnf list available ansible
sudo dnf install ansible
sudo "rpm -qa | grep ansible"
sudo dnf list ansible
execution
[root@fedora luca]# cat /etc/os-release
NAME="Fedora Linux"
VERSION="38 (Workstation Edition)"
ID=fedora
VERSION_ID=38
VERSION_CODENAME=""
PLATFORM_ID="platform:f38"
PRETTY_NAME="Fedora Linux 38 (Workstation Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:38"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f38/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=38
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=38
SUPPORT_END=2024-05-14
VARIANT="Workstation Edition"
VARIANT_ID=workstation
[root@fedora luca]# ansible
bash: ansible: command not found...
Install package 'ansible-core' to provide command 'ansible'? [N/y] n
[root@fedora luca]# dnf list available ansible-core
Last metadata expiration check: 0:00:27 ago on Sat 10 Jun 2023 10:16:31 AM UTC.
Available Packages
ansible-core.noarch 2.14.6-1.fc38 updates
[root@fedora luca]# dnf list available ansible
Last metadata expiration check: 0:00:34 ago on Sat 10 Jun 2023 10:16:31 AM UTC.
Available Packages
ansible.noarch 7.6.0-1.fc38 updates
[root@fedora luca]# rpm -qa|grep ansible
[root@fedora luca]# ansible --version
bash: ansible: command not found...
Install package 'ansible-core' to provide command 'ansible'? [N/y] n
[root@fedora luca]# dnf install ansible
Last metadata expiration check: 0:01:06 ago on Sat 10 Jun 2023 10:16:31 AM UTC.
Dependencies resolved.
==================================================================
Package Arch Version Repo Size
==================================================================
Installing:
ansible noarch 7.6.0-1.fc38 updates 45 M
Installing dependencies:
ansible-core noarch 2.14.6-1.fc38 updates 3.7 M
python3-jinja2 noarch 3.0.3-7.fc38 fedora 638 k
python3-resolvelib noarch 0.5.5-7.fc38 fedora 43 k
Transaction Summary
==================================================================
Install 4 Packages
Total download size: 50 M
Installed size: 351 M
Is this ok [y/N]: y
Downloading Packages:
(1/4): python3-resolvelib-0.5.5-7 111 kB/s | 43 kB 00:00
(2/4): python3-jinja2-3.0.3-7.fc3 402 kB/s | 638 kB 00:01
(3/4): ansible-core-2.14.6-1.fc38 250 kB/s | 3.7 MB 00:15
(4/4): ansible-7.6.0-1.fc38.noarc 486 kB/s | 45 MB 01:35
------------------------------------------------------------------
Total 526 kB/s | 50 MB 01:36
Fedora 38 - aarch64 1.6 MB/s | 1.6 kB 00:00
Importing GPG key 0xEB10B464:
Userid : "Fedora (38) <[email protected]>"
Fingerprint: 6A51 BBAB BA3D 5467 B617 1221 809A 8D7C EB10 B464
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-38-aarch64
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 : python3-resolvelib-0.5.5-7.fc38.noarch 1/4
Installing : python3-jinja2-3.0.3-7.fc38.noarch 2/4
Installing : ansible-core-2.14.6-1.fc38.noarch 3/4
Installing : ansible-7.6.0-1.fc38.noarch 4/4
Running scriptlet: ansible-7.6.0-1.fc38.noarch 4/4
Verifying : python3-jinja2-3.0.3-7.fc38.noarch 1/4
Verifying : python3-resolvelib-0.5.5-7.fc38.noarch 2/4
Verifying : ansible-7.6.0-1.fc38.noarch 3/4
Verifying : ansible-core-2.14.6-1.fc38.noarch 4/4
Installed:
ansible-7.6.0-1.fc38.noarch
ansible-core-2.14.6-1.fc38.noarch
python3-jinja2-3.0.3-7.fc38.noarch
python3-resolvelib-0.5.5-7.fc38.noarch
Complete!
[root@fedora luca]# ansible --version
ansible [core 2.14.6]
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.11/site-packages/ansible
ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible
python version = 3.11.2 (main, Feb 8 2023, 00:00:00) [GCC 13.0.1 20230208 (Red Hat 13.0.1-0)] (/usr/bin/python3)
jinja version = 3.0.3
libyaml = True
before execution
[root@fedora luca]# dnf list available ansible-core
Last metadata expiration check: 0:00:27 ago on Sat 10 Jun 2023 10:16:31 AM UTC.
Available Packages
ansible-core.noarch 2.14.6-1.fc38 updates
[root@fedora luca]# dnf list available ansible
Last metadata expiration check: 0:00:34 ago on Sat 10 Jun 2023 10:16:31 AM UTC.
Available Packages
ansible.noarch 7.6.0-1.fc38 updates
[root@fedora luca]# rpm -qa|grep ansible
[root@fedora luca]# ansible --version
bash: ansible: command not found...
Install package 'ansible-core' to provide command 'ansible'? [N/y] n
after execution
[root@fedora luca]# rpm -qa | grep ansible
ansible-core-2.14.6-1.fc38.noarch
ansible-7.6.0-1.fc38.noarch
[root@fedora luca]# dnf list ansible
Last metadata expiration check: 0:03:44 ago on Sat 10 Jun 2023 10:16:31 AM UTC.
Installed Packages
ansible.noarch 7.6.0-1.fc38 @updates
[root@fedora luca]# dnf list ansible-core
Last metadata expiration check: 0:03:49 ago on Sat 10 Jun 2023 10:16:31 AM UTC.
Installed Packages
ansible-core.noarch 2.14.6-1.fc38 @updates
[root@fedora luca]# ansible --version
ansible [core 2.14.6]
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.11/site-packages/ansible
ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible
python version = 3.11.2 (main, Feb 8 2023, 00:00:00) [GCC 13.0.1 20230208 (Red Hat 13.0.1-0)] (/usr/bin/python3)
jinja version = 3.0.3
libyaml = True
Recap
Now you know how to install the latest version of Ansible in Fedora using the system repository and the DNF package manager. Subscribe to the YouTube channel, Medium, Website, Twitter, and Substack 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
Donate
Want to keep this project going? Please donate