In this article, I will show you how to install ‘Ansible’ on RHEL/CentOS 7/6. Like other configuration management tools like puppet, chef and CFEngine, server software is installed on one machine and client machines are managed through the agent. Wherein Ansible, the nodes are managed by controlling machine (Ansible server) over SSH, so there won’t be any agent running on node machines.
Base Requirements :
- Controlling Machine ,
- Client Nodes ,
- Required Packages
Software Prerequisites :
- Operating System: RHEL/CentOS/Fedora and Ubuntu/Debian/Linux Mint
- Jinja2: A modern, fast and easy to use stand-alone template engine for Python.
- PyYAML: A YAML parser and emitter for the Python programming language.
- parmiko: A native Python SSHv2 channel library.
- httplib2: A comprehensive HTTP client library.
- sshpass: A non-interactive ssh password authentication.
My Controlling Machine and Nodes :
- 192.168.87.145 server.gekvplabs.com server
- 192.168.87.146 node1.gekvplabs.com node1
- 192.168.87.147 node2.gekvplabs.com node2
Installation of Ansible on On RHEL/CentOS :
- Run yum update for updating all existing packages
- yum update -y
- Install EPEL repo
- yum install epel-release
- After configuring epel repository, you can install Ansible using following command
- sudo yum install ansible -y
- After installed successfully, you can verify the version by executing below command.
Ansible is a free configuration management tool, it supports managing the configurations of Unix-like and Microsoft windows systems. Ansible manages nodes over SSH or PowerShell and python to be installed on them.
Ansible is agent-less, that means no need of any agent installation on remote nodes, so it means there are no any background daemons or programs are executing for Ansible, when it’s not managing any nodes.
Ansible can handle 100’s of nodes from a single system over SSH connection and the entire operation can be handled and executed by one single command ‘ansible’. But, in some cases, where you required to execute multiple commands for a deployment, here we can build playbooks.