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


How to install Ansible in Fedora version 35. Today we’re going to talk about the easier way to install and maintain Ansible inside Fedora 35 using the default repository. I’m Luca Berton and welcome to today’s episode of Ansible Pilot.
How to install Ansible in Fedora 35
Today we’re talking about How to install Ansible in Fedora 35. 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.9.
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 list available ansible
$ sudo dnf install ansible
$ sudo "rpm -qa | grep ansible"
$ sudo dnf list ansible
execution
$ ssh [email protected]
[devops@demo ~]$ sudo su
[root@demo devops]# cat /etc/redhat-release
Fedora release 35 (Thirty Five)
[root@demo devops]# hostnamectl
Static hostname: demo.example.com
Icon name: computer-vm
Chassis: vm
Machine ID: 1894b60f7c1a45b9a6fc87cf8a4bed54
Boot ID: 68bfe9b366c34c8d95df1a3774cf5641
Virtualization: oracle
Operating System: Fedora Linux 35 (Cloud Edition)
CPE OS Name: cpe:/o:fedoraproject:fedora:35
Kernel: Linux 5.14.10-300.fc35.x86_64
Architecture: x86-64
Hardware Vendor: innotek GmbH
Hardware Model: VirtualBox
[root@demo devops]# dnf list available ansible
Fedora 35 - x86_64 3.3 MB/s | 61 MB 00:18
Fedora 35 openh264 (From Cisco) - x86_64 2.7 kB/s | 2.5 kB 00:00
Fedora Modular 35 - x86_64 1.6 MB/s | 2.6 MB 00:01
Fedora 35 - x86_64 - Updates 1.1 MB/s | 15 MB 00:12
Fedora Modular 35 - x86_64 - Updates 400 kB/s | 736 kB 00:01
Available Packages
ansible.noarch 2.9.27-1.fc35 updates
[root@demo devops]# dnf install ansible
Last metadata expiration check: 0:00:14 ago on Fri 03 Dec 2021 03:42:34 PM UTC.
Dependencies resolved.
===================================================================================================
Package Architecture Version Repository Size
===================================================================================================
Installing:
ansible noarch 2.9.27-1.fc35 updates 15 M
Installing dependencies:
libsodium x86_64 1.0.18-8.fc35 fedora 161 k
python3-bcrypt x86_64 3.2.0-1.fc35 fedora 43 k
python3-jmespath noarch 0.10.0-4.fc35 fedora 46 k
python3-ntlm-auth noarch 1.5.0-4.fc35 fedora 53 k
python3-pynacl x86_64 1.4.0-4.fc35 fedora 108 k
python3-requests_ntlm noarch 1.1.0-16.fc35 fedora 18 k
python3-xmltodict noarch 0.12.0-13.fc35 fedora 22 k
sshpass x86_64 1.09-2.fc35 fedora 27 k
Installing weak dependencies:
python3-paramiko noarch 2.7.2-6.fc35 fedora 288 k
python3-pyasn1 noarch 0.4.8-7.fc35 fedora 134 k
python3-winrm noarch 0.4.1-4.fc35 fedora 80 k
Transaction Summary
===================================================================================================
Install 12 Packages
Total download size: 16 M
Installed size: 100 M
Is this ok [y/N]: y
Downloading Packages:
(1/12): python3-bcrypt-3.2.0-1.fc35.x86_64.rpm 317 kB/s | 43 kB 00:00
(2/12): python3-jmespath-0.10.0-4.fc35.noarch.rpm 323 kB/s | 46 kB 00:00
(3/12): libsodium-1.0.18-8.fc35.x86_64.rpm 704 kB/s | 161 kB 00:00
(4/12): python3-ntlm-auth-1.5.0-4.fc35.noarch.rpm 566 kB/s | 53 kB 00:00
(5/12): python3-pyasn1-0.4.8-7.fc35.noarch.rpm 1.5 MB/s | 134 kB 00:00
(6/12): python3-paramiko-2.7.2-6.fc35.noarch.rpm 1.4 MB/s | 288 kB 00:00
(7/12): python3-requests_ntlm-1.1.0-16.fc35.noarch.rpm 827 kB/s | 18 kB 00:00
(8/12): python3-pynacl-1.4.0-4.fc35.x86_64.rpm 935 kB/s | 108 kB 00:00
(9/12): python3-xmltodict-0.12.0-13.fc35.noarch.rpm 848 kB/s | 22 kB 00:00
(10/12): sshpass-1.09-2.fc35.x86_64.rpm 580 kB/s | 27 kB 00:00
(11/12): python3-winrm-0.4.1-4.fc35.noarch.rpm 1.3 MB/s | 80 kB 00:00
(12/12): ansible-2.9.27-1.fc35.noarch.rpm 1.4 MB/s | 15 MB 00:11
---------------------------------------------------------------------------------------------------
Total 1.3 MB/s | 16 MB 00:12
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : sshpass-1.09-2.fc35.x86_64 1/12
Installing : python3-xmltodict-0.12.0-13.fc35.noarch 2/12
Installing : python3-pyasn1-0.4.8-7.fc35.noarch 3/12
Installing : python3-ntlm-auth-1.5.0-4.fc35.noarch 4/12
Installing : python3-requests_ntlm-1.1.0-16.fc35.noarch 5/12
Installing : python3-winrm-0.4.1-4.fc35.noarch 6/12
Installing : python3-jmespath-0.10.0-4.fc35.noarch 7/12
Installing : python3-bcrypt-3.2.0-1.fc35.x86_64 8/12
Installing : libsodium-1.0.18-8.fc35.x86_64 9/12
Installing : python3-pynacl-1.4.0-4.fc35.x86_64 10/12
Installing : python3-paramiko-2.7.2-6.fc35.noarch 11/12
Installing : ansible-2.9.27-1.fc35.noarch 12/12
Running scriptlet: ansible-2.9.27-1.fc35.noarch 12/12
Verifying : libsodium-1.0.18-8.fc35.x86_64 1/12
Verifying : python3-bcrypt-3.2.0-1.fc35.x86_64 2/12
Verifying : python3-jmespath-0.10.0-4.fc35.noarch 3/12
Verifying : python3-ntlm-auth-1.5.0-4.fc35.noarch 4/12
Verifying : python3-paramiko-2.7.2-6.fc35.noarch 5/12
Verifying : python3-pyasn1-0.4.8-7.fc35.noarch 6/12
Verifying : python3-pynacl-1.4.0-4.fc35.x86_64 7/12
Verifying : python3-requests_ntlm-1.1.0-16.fc35.noarch 8/12
Verifying : python3-winrm-0.4.1-4.fc35.noarch 9/12
Verifying : python3-xmltodict-0.12.0-13.fc35.noarch 10/12
Verifying : sshpass-1.09-2.fc35.x86_64 11/12
Verifying : ansible-2.9.27-1.fc35.noarch 12/12
Installed:
ansible-2.9.27-1.fc35.noarch libsodium-1.0.18-8.fc35.x86_64
python3-bcrypt-3.2.0-1.fc35.x86_64 python3-jmespath-0.10.0-4.fc35.noarch
python3-ntlm-auth-1.5.0-4.fc35.noarch python3-paramiko-2.7.2-6.fc35.noarch
python3-pyasn1-0.4.8-7.fc35.noarch python3-pynacl-1.4.0-4.fc35.x86_64
python3-requests_ntlm-1.1.0-16.fc35.noarch python3-winrm-0.4.1-4.fc35.noarch
python3-xmltodict-0.12.0-13.fc35.noarch sshpass-1.09-2.fc35.x86_64
Complete!
[root@demo devops]# rpm -qa | grep ansible
ansible-2.9.27-1.fc35.noarch
[root@demo devops]# ansible --version
ansible 2.9.27
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.10/site-packages/ansible
executable location = /usr/bin/ansible
python version = 3.10.0 (default, Oct 4 2021, 00:00:00) [GCC 11.2.1 20210728 (Red Hat 11.2.1-1)]
[root@demo devops]# yum list installed google-chrome-stable
Error: No matching Packages to list
[root@demo devops]# yum list installed ansible
Installed Packages
ansible.noarch 2.9.27-1.fc35 @updates
[root@demo devops]# dnf list installed ansible
Installed Packages
ansible.noarch 2.9.27-1.fc35 @updates
[root@demo devops]#
before execution
$ ssh [email protected]
[devops@demo ~]$ sudo su
[root@demo devops]# cat /etc/redhat-release
Fedora release 35 (Thirty Five)
[root@demo devops]# hostnamectl
Static hostname: demo.example.com
Icon name: computer-vm
Chassis: vm
Machine ID: 1894b60f7c1a45b9a6fc87cf8a4bed54
Boot ID: 68bfe9b366c34c8d95df1a3774cf5641
Virtualization: oracle
Operating System: Fedora Linux 35 (Cloud Edition)
CPE OS Name: cpe:/o:fedoraproject:fedora:35
Kernel: Linux 5.14.10-300.fc35.x86_64
Architecture: x86-64
Hardware Vendor: innotek GmbH
Hardware Model: VirtualBox
[root@demo devops]# dnf list installed ansible
Error: No matching Packages to list
[root@demo devops]# dnf list ansible
Last metadata expiration check: 0:03:45 ago on Fri 03 Dec 2021 03:42:34 PM UTC.
Available Packages
ansible.noarch 2.9.27-1.fc35 updates
[root@demo devops]#
after execution
[root@demo devops]# rpm -qa | grep ansible
ansible-2.9.27-1.fc35.noarch
[root@demo devops]# ansible --version
ansible 2.9.27
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.10/site-packages/ansible
executable location = /usr/bin/ansible
python version = 3.10.0 (default, Oct 4 2021, 00:00:00) [GCC 11.2.1 20210728 (Red Hat 11.2.1-1)]
[root@demo devops]# yum list installed google-chrome-stable
Error: No matching Packages to list
[root@demo devops]# yum list installed ansible
Installed Packages
ansible.noarch 2.9.27-1.fc35 @updates
[root@demo devops]# dnf list installed ansible
Installed Packages
ansible.noarch 2.9.27-1.fc35 @updates
[root@demo devops]#
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