cancel
Showing results for 
Search instead for 
Did you mean: 
Trevor
Commander Commander
Commander
  • 424 Views

Commands to Install Ansible

The following commands can be used to install Ansible
on a RHEL node:

$ sudo python -m pip install ansible

         or  

$ sudo dnf install ansible-core

 

Are there any other commands that can be used
to accomplish this?

 

Trevor "Red Hat Evangelist" Chandler
Labels (1)
0 Kudos
3 Replies
  • 377 Views


@Trevor wrote:

The following commands can be used to install Ansible
on a RHEL node:

$ sudo python -m pip install ansible

         or  

$ sudo dnf install ansible-core

 

Are there any other commands that can be used
to accomplish this?

 



Yes. On RHEL, Ansible can also be installed using:

 

$ sudo dnf install ansible
 

(from AppStream or EPEL, depending on the RHEL version).
Additionally, Ansible can be installed in isolated environments using tools like pipx, but dnf and pip remain the most common methods.

0 Kudos
rrathbun
Mission Specialist
Mission Specialist
  • 223 Views

sudo dnf install ansible-core, and I steer away from PIP. In my home lab, I simply use my developer subscription and install AAP 2.6 containerized on RHEL 9.7. 

0 Kudos
Travis
Moderator
Moderator
  • 192 Views

@Trevor -

Be careful with how you install ... technically the pip installation will install Ansible, but that is the upstream version of Ansible and not the Red Hat supported binaries. So installing upstream you will often get a newer "unsupported" version of Ansible. Additionally, this method requires you to manage Python a little bit better than the traditional supported RPM method within RHEL.

Travis Michette, RHCA XIII
https://rhtapps.redhat.com/verify?certId=111-134-086
SENIOR TECHNICAL INSTRUCTOR / CERTIFIED INSTRUCTOR AND EXAMINER
Red Hat Certification + Training
0 Kudos
Join the discussion
You must log in to join this conversation.