In this tutorial, we will show you how to install Ansible on Fedora 37. For those of you who didn’t know, Ansible is an open-source IT automation and configuration management tool that can help system administrators automate tasks, deploy applications, and manage infrastructure. It is designed to be easy to use, and it can help reduce the complexity and time spent on system administration tasks.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘
sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of Ansible automating IT infrastructure tool on a Fedora 37.
- A server running one of the following operating systems: Fedora 37.
- It’s recommended that you use a fresh OS install to prevent any potential issues.
- SSH access to the server (or just open Terminal if you’re on a desktop).
- An active internet connection. You’ll need an internet connection to download the necessary packages and dependencies for Ansible package.
non-root sudo useror access to the
root user. We recommend acting as a
non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.
Install Ansible on Fedora 37
Step 1. Before proceeding, update your Fedora operating system to make sure all existing packages are up to date. Use this command to update the server packages:
sudo dnf upgrade sudo dnf update sudo dnf install epel-release
Step 2. Installing Python.
By default, Python is available in the default repositories of Fedora 37, so you can install it using the
dnf package manager. To install Python, run the following command below:
sudo dnf install python3
This command will install the latest version of Python 3 available in the Fedora 37 repositories. If you require a specific version, you can specify it by typing the following command:
sudo dnf install python3.x
You can verify that Python is installed by running the following command:
For additional resources on installing Python, read the post below:
Step 3. Installing Ansible on Fedora 37.
By default, Ansible is available on the Fedora 37 base repository. Now we install the latest version of Ansible using
dnf the command:
sudo dnf install ansible
During the installation, you may be prompted to confirm the installation of dependencies. Type ‘Y‘ and press enter to continue with the installation.
Now verify that Ansible is installed and working correctly by running the following command:
ansible 2.11.6 config file = /etc/ansible/ansible.cfg configured module search path = ['/home/user/.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, Dec 10 2022, 11:12:46) [GCC 11.2.1 20210728 (Red Hat 11.2.1-1)]
Congratulations! You have successfully installed Ansible. Thanks for using this tutorial for installing Ansible automating IT infrastructure tasks on your Fedora 37 system. For additional help or useful information, we recommend you check the official Ansible website.