Ansible's architecture

Ansible is a free software tool for automated deployments in IT environments. With this tool, we get to distribute applications or configuration files, among other things, for the different nodes of our environment. This is known as an orchestration tool, such as Puppet, Chef, or Salt. The advantage of using Ansible is that we do not need to install agents since it performs these tasks through SSH; it uses YAML as a serialization format to describe the reusable configurations of the systems.

There are two types of servers:

  • Controller or Ansible manager: The machine from which the orchestration begins
  • Managed nodes: The machines handled by the controller through SSH

Ansible manages its different nodes through SSH and only requires Python on the remote server where it will run.

In this diagram, we can see the components of the Ansible architecture:

The Ansible architecture is agentless in the sense that there is no software or agent to be installed on the client that communicates back to the server. Instead of relying on remote host agents, Ansible uses SSH to push its changes to the remote host.

The idea is to have one or more control machines from where you can issue ad-hoc commands to remote machines (through Ansible tool) or execute a set of instructions in sequence through the playbooks (through the ansible-playbook tool).

Basically, we use the Ansible control manager machine, which will normally be your desktop, laptop, or server. From there, the control manager uses Ansible to distribute the configuration changes through SSH.

Another feature of Ansible is that it is idempotent, which means that if a task has already been done and the playbook is re-launched, it will not change anything since the task has already been executed.

The host inventory file determines the destination machines where these plays will be executed. The Ansible configuration file can be customized to reflect the configuration of your environment.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset