Ansible is an open-source software provisioning, configuration management, and deployment tool. It runs on many Unix-like systems and can configure both Unix-like systems as well as Microsoft Windows. Ansible uses SSH protocol in order to configure the remote servers. Ansible follows the push-based mechanism to configure the remote servers.
Ansible is an automation tool that provides a way to define infrastructure as code. Ansible can be used to provide the underlying infrastructure of your environment, virtualized hosts and hypervisors, network devices, and bare metal servers.
Features of Ansible
. Ansible manages machines in an agent-less manner using SSH
. Built on top of Python and hence provides a lot of Python’s functionality.
. YAML based playbooks.
. Uses SSH for secure connections.
. Follows push-based architecture for sending configuration related notifications.
xxxxxxxxxx
Ansible is a combination of multiple pieces working together
to become an automation tool.
Mainly these are modules, playbooks, and plugins.
• Modules are small codes that will get executed.
There are multiple inbuilt modules that serve as a starting point
for building tasks.
• Playbooks contain plays which further is a group of tasks.
This is the place to define the workflow or the steps needed
to complete a process
• Plugins are special kinds of modules that run on the main control machine
for logging purposes. There are other types of plugins also.
The playbooks ran via an Ansible automation engine.
These playbooks contain modules that are basically actions that
run in host machines.
The mechanism is followed here is the push mechanism,
so ansible pushes small programs to these host machines which are written to be
resource models of the desired state of the system.
xxxxxxxxxx
Ansible, unlike other configuration management tools,
is categorized into two types of servers – Controlling machines and Nodes.
Controlling machine is where Ansible is installed and nodes
are the ones that are managed by the controlling machines through SSH.
There is an inventory file in the controlling machine that holds the location
of the node systems. Ansible deploys modules on the node systems by running
the playbook on the controlling machine. Ansible is agentless,
that means there is no need to have a third party tool to make a
connection between one node and the other