How to install Ansible on Fedora 32 for IT and server automation

Ansible is a popular open-source IT automation tool that can be used to manage and configure servers and other infrastructure. To install Ansible on Fedora 32, you can use the dnf package manager.

  1. Open a terminal and update the package list by running the command:
sudo dnf update
  1. Install the Ansible package by running the command:
sudo dnf install ansible
  1. Once the installation is complete, you can check the version of Ansible that you have installed by running the command:
ansible --version
  1. Ansible also requires python3-libselinux package in order to run properly, you can install it by running the command:
sudo dnf install python3-libselinux
  1. To test Ansible, you can create a simple inventory file, which lists the hosts that you want to manage with Ansible. For example, you can create a file named hosts in the directory /etc/ansible/ with the following content:
[local]
localhost ansible_connection=local
  1. You can now run a simple Ansible command to check the connectivity to the localhost using the following command:
ansible all -i /etc/ansible/hosts -m ping

Please note that the package name may vary depending on the version of Fedora you are running.

You can also use the dnf search command to look for the package before installing.

dnf search ansible

You can also add the EPEL repository to your system, this will have more up to date version of ansible package.

sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-32.noarch.rpm
sudo dnf install ansible

Now you have ansible installed and ready to use for IT and server automation tasks.

Leave a Comment