Installing Ansible on Linux
The Ansible package is available on all major Linux distributions. In this section, we will install it onto both Ubuntu and CentOS machines. The Ansible 2.5 release was used at the time of developing this book, and it provides support for both Python 2.6 and Python 2.7. Also, starting from version 2.2, Ansible provides a tech preview for Python 3.5+.
On RHEL and CentOS
You will need to have the EPEL repository installed and enabled before installing Ansible. To do so, use the following command:
sudo yum install epel-release
Then, proceed with the Ansible package installation, as shown in the following command:
sudo yum install Ansible
Ubuntu
First, make sure that your system is up to date, and add the Ansible channel. Finally, install the Ansible package itself, as shown in the following snippet:
$ sudo apt-get update
$ sudo apt-get install software-properties-common
$ sudo apt-add-repository ppa:Ansible/Ansible
$ sudo apt-get update
$ sudo apt-get install Ansible
For...