Ansible Pilot

How to install Ansible in Fedora 34 - Ansible install

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

October 21, 2021
Access the Complete Video Course and Learn Quick Ansible by 200+ Practical Lessons

How to install Ansible in Fedora version 34. Today we’re going to talk about the easier way to install and maintain Ansible inside Fedora 34 using the default repository. I’m Luca Berton and welcome to today’s episode of Ansible Pilot.

How to install Ansible in Fedora 34

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

Books

demo

Let’s jump in a quick live demo of how to install the latest and a specific version of Ansible in Fedora.

code

#!/bin/bash
$ sudo dnf list available ansible
$ sudo dnf install ansible

execution

output

# cat /etc/redhat-release 
Fedora release 34 (Thirty Four)

# dnf list available ansible
Last metadata expiration check: 0:15:48 ago on Thu 21 Oct 2021 06:02:41 AM UTC.
Available Packages
ansible.noarch                                2.9.25-1.fc34                                 updates

# dnf install ansible
Last metadata expiration check: 0:16:00 ago on Thu 21 Oct 2021 06:02:41 AM UTC.
Dependencies resolved.
===================================================================================================
 Package                         Architecture     Version                  Repository         Size
===================================================================================================
Installing:
 ansible                         noarch           2.9.25-1.fc34            updates            15 M
Installing dependencies:
 libsodium                       x86_64           1.0.18-7.fc34            fedora            165 k
 python3-bcrypt                  x86_64           3.1.7-7.fc34             fedora             44 k
 python3-jmespath                noarch           0.10.0-1.fc34            updates            46 k
 python3-ntlm-auth               noarch           1.5.0-2.fc34             fedora             53 k
 python3-pynacl                  x86_64           1.4.0-2.fc34             fedora            110 k
 python3-requests_ntlm           noarch           1.1.0-14.fc34            fedora             18 k
 python3-xmltodict               noarch           0.12.0-11.fc34           fedora             23 k
 sshpass                         x86_64           1.09-1.fc34              fedora             27 k
Installing weak dependencies:
 python3-paramiko                noarch           2.7.2-4.fc34             fedora            287 k
 python3-pyasn1                  noarch           0.4.8-4.fc34             fedora            133 k
 python3-winrm                   noarch           0.4.1-2.fc34             fedora             79 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): libsodium-1.0.18-7.fc34.x86_64.rpm                         3.4 MB/s | 165 kB     00:00    
(2/12): python3-jmespath-0.10.0-1.fc34.noarch.rpm                  692 kB/s |  46 kB     00:00    
(3/12): python3-ntlm-auth-1.5.0-2.fc34.noarch.rpm                  511 kB/s |  53 kB     00:00    
(4/12): python3-paramiko-2.7.2-4.fc34.noarch.rpm                   1.3 MB/s | 287 kB     00:00    
(5/12): python3-bcrypt-3.1.7-7.fc34.x86_64.rpm                     112 kB/s |  44 kB     00:00    
(6/12): python3-pyasn1-0.4.8-4.fc34.noarch.rpm                     1.3 MB/s | 133 kB     00:00    
(7/12): python3-requests_ntlm-1.1.0-14.fc34.noarch.rpm             473 kB/s |  18 kB     00:00    
(8/12): python3-pynacl-1.4.0-2.fc34.x86_64.rpm                     886 kB/s | 110 kB     00:00    
(9/12): python3-winrm-0.4.1-2.fc34.noarch.rpm                      1.1 MB/s |  79 kB     00:00    
(10/12): sshpass-1.09-1.fc34.x86_64.rpm                            923 kB/s |  27 kB     00:00    
(11/12): python3-xmltodict-0.12.0-11.fc34.noarch.rpm               196 kB/s |  23 kB     00:00    
(12/12): ansible-2.9.25-1.fc34.noarch.rpm                          3.3 MB/s |  15 MB     00:04    
---------------------------------------------------------------------------------------------------
Total                                                              3.4 MB/s |  16 MB     00:04     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                           1/1 
  Installing       : sshpass-1.09-1.fc34.x86_64                                               1/12 
  Installing       : python3-xmltodict-0.12.0-11.fc34.noarch                                  2/12 
  Installing       : python3-pyasn1-0.4.8-4.fc34.noarch                                       3/12 
  Installing       : python3-ntlm-auth-1.5.0-2.fc34.noarch                                    4/12 
  Installing       : python3-requests_ntlm-1.1.0-14.fc34.noarch                               5/12 
  Installing       : python3-winrm-0.4.1-2.fc34.noarch                                        6/12 
  Installing       : python3-bcrypt-3.1.7-7.fc34.x86_64                                       7/12 
  Installing       : libsodium-1.0.18-7.fc34.x86_64                                           8/12 
  Installing       : python3-pynacl-1.4.0-2.fc34.x86_64                                       9/12 
  Installing       : python3-paramiko-2.7.2-4.fc34.noarch                                    10/12 
  Installing       : python3-jmespath-0.10.0-1.fc34.noarch                                   11/12 
  Installing       : ansible-2.9.25-1.fc34.noarch                                            12/12 
  Running scriptlet: ansible-2.9.25-1.fc34.noarch                                            12/12 
  Verifying        : ansible-2.9.25-1.fc34.noarch                                             1/12 
  Verifying        : python3-jmespath-0.10.0-1.fc34.noarch                                    2/12 
  Verifying        : libsodium-1.0.18-7.fc34.x86_64                                           3/12 
  Verifying        : python3-bcrypt-3.1.7-7.fc34.x86_64                                       4/12 
  Verifying        : python3-ntlm-auth-1.5.0-2.fc34.noarch                                    5/12 
  Verifying        : python3-paramiko-2.7.2-4.fc34.noarch                                     6/12 
  Verifying        : python3-pyasn1-0.4.8-4.fc34.noarch                                       7/12 
  Verifying        : python3-pynacl-1.4.0-2.fc34.x86_64                                       8/12 
  Verifying        : python3-requests_ntlm-1.1.0-14.fc34.noarch                               9/12 
  Verifying        : python3-winrm-0.4.1-2.fc34.noarch                                       10/12 
  Verifying        : python3-xmltodict-0.12.0-11.fc34.noarch                                 11/12 
  Verifying        : sshpass-1.09-1.fc34.x86_64                                              12/12
Installed:
  ansible-2.9.25-1.fc34.noarch                       libsodium-1.0.18-7.fc34.x86_64               
  python3-bcrypt-3.1.7-7.fc34.x86_64                 python3-jmespath-0.10.0-1.fc34.noarch        
  python3-ntlm-auth-1.5.0-2.fc34.noarch              python3-paramiko-2.7.2-4.fc34.noarch         
  python3-pyasn1-0.4.8-4.fc34.noarch                 python3-pynacl-1.4.0-2.fc34.x86_64           
  python3-requests_ntlm-1.1.0-14.fc34.noarch         python3-winrm-0.4.1-2.fc34.noarch            
  python3-xmltodict-0.12.0-11.fc34.noarch            sshpass-1.09-1.fc34.x86_64
Complete!

# ansible --version
ansible 2.9.25
  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
  executable location = /usr/bin/ansible
  python version = 3.9.2 (default, Feb 20 2021, 00:00:00) [GCC 11.0.0 20210210 (Red Hat 11.0.0-0)]
#

code with ❤️ in GitHub

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

BUY the Complete PDF BOOK to easily Copy and Paste the 200+ Ansible code

Want to keep this project going? Please donate

Access the Complete Video Course and Learn Quick Ansible by 200+ Practical Lessons
Trustpilot
Follow me

Subscribe not to miss any new releases

FREE Top 10 Best Practices

Top 10 Best Practices of Ansible Automation: save time, reduce errors and stress