Easy Way to Install Ansible on Linux
What is the easiest way to install Ansible on Linux?
Ansible is a powerful open-source automation tool that helps sysadmins manage and configure systems quickly and easily. It’s one of the most popular automation tools out there, and for a good reason – it’s easy to use and delivers powerful results.
This article shows you how to install Ansible on Linux versions using PIP. We’ll also show you how to configure Ansible and use it to automate system administration tasks.
If you use Ansible from the official Red Hat or CentOS repositories, you may have noticed that the Ansible revision available via Yum is significantly outdated. Take Red Hat 7, for example; not a very old version of Red Hat, but certainly not the newest. If you install Ansible via the official rhel-7-server-extras-beta-rpms repo, you get version ansible-22.214.171.124-4.el7.noarch
What is the latest version of Ansible?
At the time of writing, the latest version of Ansible is 4.10.0 (much more up-to-date than 2.3.0)
How do I Install Python PIP?
Python is a high-level programming language that lets you create sophisticated software programs. Pip is a package management tool for Python that makes it easy to install and manage software packages. Pip is included with the Python installation, so you can install and manage software packages using the command line.
If you are using Python3.6 or above, use
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py python get-pip.py --user
If you are using an older version of Python use
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py python get-pip.py --user
You should receive a message like this
Successfully installed pip-20.3.4 setuptools-44.1.1 wheel-0.37.1
Now use PIP to install the latest version of Ansible
python -m pip install --user ansible
Depending on your system, it may take a few minutes to install. The installation will look something like this:
Thats it! You are now ready to start experimenting with Ansible on your Linux System. Have Fun.