The below diagram depicts the Ansible architecture:
Ansible Architecture – Ansible Interview Questions – Edureka
The main component of Ansible is the Ansible automation engine.
This engine directly interacts with various cloud services,
Configuration Management Database (CMBD) and different users who write
various playbooks to execute the Ansible Automation engine.
The Ansible Automation engine consists of the following components:
Inventories: These are a list of nodes containing
their respective IP addresses, servers, databases, etc. which needs to be managed.
APIs: Just like any other API, the Ansible APIs are used
for commuting various Cloud services, public or private services.
Modules: The modules are used to manage system resources, packages,
libraries, files, etc. Ansible modules can be used to automate a
wide range of tasks. Ansible provides around 450 modules that automate
nearly every part of your environment.
Plugins: If you want to execute Ansible tasks as a job,
Ansible Plugins can be used. They simplify the execution of a task
by building a job like an environment that basically contains pieces
of code corresponding to some specific functionality.
There are 100s of Plugins provided by Ansible.
An example is the Action plugin, which acts as front ends
to modules and can execute tasks on the controller
before calling the modules themselves.
Networking: Ansible can also be used to automate different networks
and services. It can do this by creating a playbook or an Ansible role
that easily spans different network hardware.
Hosts: The Ansible Hosts/ Node systems are machines (Linux, Windows, etc)
that are getting automated.
Playbooks: Playbooks are simple code files which describe the tasks
that need to be executed. The Playbooks are written in YAML format.
They can be used to automate tasks, declare configurations, etc.
CMDB: It is a database that acts as a storehouse for various IT installations.
It holds data about various IT assets (also known as configuration items (CI))
and describes the relationships between such assets.
Cloud: It is a network of remote servers hosted on the Internet
to store, manage, and process data, rather than a local server.
To learn more about Ansible, you can go through this Ansible Tutorial blog.