Search This Blog

Monday 8 February 2021

How Ansible works ?

 


1) Users: Who writes ansible playbooks

2) Ansible Playbooks: Playbooks are written in the YML. Those are going to invoke ansible modules in things called tasks which could execute sequentially in order from top to bottom.

3) Modules: modules are essentially executable bits of code that are pushed out to your target HOSTS. Modules are written in python, power shell or any other language. we don't have to understand the underlying code of these modules to get them work. We need to be able to pass the correct arguments for playbooks.

4) Inventory: Modules are going to act against inventory which consists of hosts and groups

5) Inventory providers: Ansible supports various types of providers for storing inventory data. 
Cloud providers: OpenStack, VMware, EC2, Rack Space, GCW, Azure, Spacewalk, Hanlon, Cobbler  & Custom CMDB.

6) API:  There are several ways to use Ansible from an API perspective. You can use the Ansible Python API to control nodes, you can extend Ansible to respond to various Python events, you can write plugins, and you can plug in inventory data from external data sources. 

7) Plugins: Plugins are pieces of code that augment Ansible’s core functionality. Ansible uses a plugin architecture to enable a rich, flexible and expandable feature set. Ansible ships with a number of handy plugins, and you can easily write your own.



No comments: