Architecture of Ansible.

Arpita Srivastava
2 min readFeb 6, 2021

Here is the small description Ansible Architecture.

From the above diagram visibility comes into the picture:

  • Users: Users who create Ansible playbook has a direct connection with ansible automation Engine.
  • Ansible playbook: Playbooks can finely orchestrate multiple slices of your infrastructure topology, with very detailed control over how many machines to tackle at a time. This is where Ansible starts to get most interesting. It also interacts with the ansible automation engine and configuration Management Database.

Here’s what a simple playbook looks like:

---
- hosts: webservers
serial: 5 # update 5 machines at a time
roles:
- common
- webapp

- hosts: content_servers
roles:
- common
- content
  • Public or Private cloud: They help in interacting with all the modules and API with this but also with the entire cloud which proves that it has security measures as well.
  • Inventory: Inventory which is a part of the automation engine helps in provisioning and internal provisioning using automation.

Here’s what a plain text inventory file looks like:

Once inventory hosts are listed, variables can be assigned to them in simple text files (in a subdirectory called ‘group_vars/’ or ‘host_vars/’ or directly in the inventory file.

---
[webservers]
www1.example.com
www2.example.com

[dbservers]
db0.example.com
db1.example.com
  • API: It helps in creating necessary API for the interaction of end to end modules.
  • Modules: The modules are directly run using playbooks the modules can control all services, packages, AWS cloud formation, etc. Ansible works by connecting to your nodes and pushing out scripts called “Ansible modules” to them. Most modules accept parameters that describe the desired state of the system. You can write your own modules, though you should first consider whether you should.
  • Plugins: Plugins augment Ansible’s core functionality. While modules execute on the target system in separate processes (usually that means on a remote system), plugins execute on the control node within the /usr/bin/ansible process. Plugins offer options and extensions for the core features of Ansible - transforming data, logging output, connecting to inventory, and more.
  • Networking: It helps to automate different networks that make use of all agentless frames and generate useful configurations.
  • Hosts: Hosts here refers to the machines like Linux or Unix machines which are getting automated using Ansible.
  • CMDB (Configuration Management Database): It is a kind of repository that consists of an entire network of computers of operational or IT infrastructure.

Thanks for reading. Hope it will help you…….See you in my next blog.

--

--