Install Ansible via pip-
Ansible is written in Python and it can be installed as its package.
Install Python and pip:
First, install Python 3 and pip if they are not already installed:
sudo dnf install python3 python3-pip -y
Install Ansible using pip:
Now, you can install Ansible using pip:
pip3 install ansible --user
Add the user local bin to your PATH:
You may need to add the user local bin directory to your PATH. You can do this by adding the following line to your ~/.bashrc file:
echo 'export PATH=$PATH:$HOME/.local/bin' >> ~/.bashrc
source ~/.bashrc
Verify the installation:
Check the Ansible version to confirm it's installed correctly:
ansible --version
Comments