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 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.
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.
@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.
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.