
Mastering Linux Administration
By :

In this section, we'll show you how to install Ansible on a control node. On Linux, we can install Ansible in a couple of ways:
apt
on Ubuntu/Debian and yum
on RHEL/CentOS)pip
, the Python package managerThe Ansible community recommends pip
for installing Ansible since it provides the most recent stable version of Ansible. In this section, we'll use both methods on Ubuntu and RHEL/CentOS. For a complete Ansible installation guide for all major OS platforms, please follow the online documentation at https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html.
On the control node, Ansible requires Python, so before installing Ansible, we need to make sure we have Python installed on our system.
Important note
Python 2 is no longer supported as of January 1, 2020. Please use Python 3 instead.
Let's start by installing Ansible on Ubuntu...