We are going to see how to install Ansible on RHEL7/ CentOS7 in this post.
Control node needs to install Python 2.6 or latest version and windows doesn’t support for control node.
Since the ansible agentless tool, on Managed hosts no need to install any specific agent/client. And need to install python 2.4 or latest version on managed hosts.
Installing Ansible on RHEL7/ CentOS7:
To install the Ansible we should have Enabled EPEL repository on our server already
Once enable EPEL Repo, then we can start installing Ansible using yum.
[root@localhost ~]# yum install ansible -y
Post installation of ansible will check the version of Ansible by using below command
[root@localhost ~]# ansible --version ansible 2.7.9 config file = /etc/ansible/ansible.cfg configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/site-packages/ansible executable location = /usr/bin/ansible python version = 2.7.5 (default, Aug 2 2016, 04:20:16) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] [root@localhost ~]#
Finally, we installed ansible over our machine which we are going to take it as a control node.
Hereafter if we want to deploy or manage any remote hosts(Managed Host) from the control node, SSH authentication is mandatory. So, We should copy and paste the SSH keys to the remote hosts to make the communication available between the control and managed node.
Reference: Ansible documented site