Ansible Installation on Linux
Ansible is an open-source automation platform. It is simple to install. The Ansible software only needs to be installed on the controller node. Hosts/clients that are managed by Ansible do not need to have Ansible installed.
Prerequisite for Controller Node
- The controller node should be a Linux or UNIX operating system. Microsoft Windows is not supported, although Windows systems can be managed hosts. 2) Python 2 (version 2.6 or later) 3) Network connectivity from controller node to managed hosts. By default, SSH protocol is used, but other protocols might be required if Microsoft Windows or network devices are being managed. 4) python2-winrm RPM package with version 0.2.2 or later installed if Microsoft Windows systems are to be managed.
Prerequisite for Managed Hosts
For Linux and UNIX managed hosts: python 2 (version 2.4 or later) needed to be installed.
Note: If the version of Python installed is earlier than 2.5 (i.e 2.4 to 2.5), then python-simplejson package must also be installed along with Python package. Package libselinux-python should be installed on manged hosts if SELinux is enabled on managed hosts. (applicable only for Linux)
Microsoft Windows-based Managed Hosts: PowerShell 3.0 or higher should be installed. Should have PowerShell remoting configured.
Installation On Linux
Operating System Used in Below Example: CentOS Linux release 7.2.1511 (Core)
Steps to Install Ansible on Controller Node
Step 1: Check if python is installed:
[[email protected] ~]# rpm -q python python-2.7.5-34.el7.x86_64
[[email protected] ~]# yum list installed python Installed Packages python.x86_64 2.7.5-34.el7 @anaconda
Step 2: Install Ansible Package:
[[email protected] ~]# yum install ansible -y
Note: Make sure EPEL repository is already configured as Ansible package is part of EPEL repository.