Disclaimer:-Every thing provided on this website is only for Educational purposes and free. Author is not responsible,If the given information is used for any illegal or UnEthical Purposes. This website does use cookies to store information about visitors preferences, record user-specific information on which pages the user access or visit, customize Web page content based on visitors browser type or other information that the visitor sends via their browser.

Components of Ansible

Components of Ansible?

1. ansible
2. ansible-doc
3. ansible-playbook
4. ansible-pull

It perform configuration and system management. Example: Modules copy, service, file, yum, user, group, command, shell, ping etc.

Types of Modules:
1. Core Modules:   Core modules are the modules which comes with ansible package installation.Latest ansible 2.3.* has 1000+ core modules.

2. Custom Modules.
Ansible admin can write their own modules  and can add them in Ansible library. Modules are written in Python,
but they can be written in any interpreted programming language (Ruby, Shell, Python).


Feature of Ansible?

Feature of Ansible?

1. Open Source

2. It is written in Python so it is easy to read and extend.

3. Easy installation and configuration.

4. Highly scalable.

5. Agent less client configuration.

What is requirement of Ansible?

What is requirement of Ansible?
There are two types of machine in Ansible architecture:-
1. Control Node
2. Manged Node/Client Node/Remote Node

Control Node is the machine which will act as a server and other machine will act as a client.

Requirement of Control Node:-
1. Any Linux distro ( Windows is not supported for the control node)
2. Ansible Package
3. Python version 2.6 or later
4. OpenSSH package

Requirement of Client Node/Remote Node/ Managed node:-
1. Any Unix/Linux distro or any Microsoft windows OS
2. Python version 2.4 or later.
3. OpenSSH package.

***** When we do minimal installation of RHEL/CentOS then we will see python and OpenSSH both are automatically installed. Which means we just need to install Ansible package on control node and we can start using it on any environment immediately.

***** Best thing in Ansible is that it is agentless means  no agent needed like other application to establish connection between server and client.

How to install Ansible

How to install Ansible on RHEL or CentOS machine:

Step:1.  Download rpm package of EPEL(Extra package for enterprise Linux) for RHEL6.x/CentOS6.x using below link

We can use wget before above link to download package using command line. In case above link is not available then download EPEL repo from http://tinyurl.com/epelforlinux

Step:2.  When EPEL rpm is downloaded then use rpm command to install it.

rpm -ivh epel-release-6-8.noarch.rpm

Step:-3  When EPEL package is installed then it will create repo files under /etc/yum.repos.d . Now we just need to use yum command to install ansible package.

yum install ansible-2* -y

To validate ansible package installation :
rpm -qa | grep -i ansible

What is Ansible

Ansible is an open-source automation engine that automates software provisioning, configuration management, and application deployment.

As with most configuration management software, Ansible has two types of servers: controlling machines and nodes. First, there is a single controlling machine which is where orchestration begins. Nodes are managed by a controlling machine over SSH. The controlling machine describes the location of nodes through its inventory.

To orchestrate nodes, Ansible deploys modules to nodes over SSH. Modules are temporarily stored in the nodes and communicate with the controlling machine through a JSON protocol over the standard output. When Ansible is not managing nodes, it does not consume resources because no daemons or programs are executing for Ansible in the background.

The best thing of Ansible is that it uses agentless architecture.