noscript

What is Ansible?

Automation is need of IT industry. We need to automate recurring task, and using Ansible we can automate these tasks using Ansible.

Ansible components

  • Control Node
  • Managed Node
  • Inventory
  • Modules
  • Plugins
  • Collections
  • AAP
  • Playbooks
  • Plays
  • Roles
  • Tasks
  • Handles
  • Variables
  • Ansible facts
  • Ansible Vaults
  • Ansible Galaxy

 

Control Node: – The Node from which we can run Ansible CLI tools. It’s a central Node acts as Ansible Engine, from which we can deploy Playbook, tasks using modules. It should be a Linux Machine with Python Because Ansible can be installed on Linux.

Managed Nodes: – These are also referred as hosts or the targeted devices (Windows or Linux Servers, Network appliances or any computer)

Inventory: – It contains list of managed hosts. Ansible uses Inventory files to work with managed hosts.

Modules: – Tasks get executed on managed hosts using Ansible modules.

E.g.: – yum, copy, fetch, ping, etc.

 Plugins: – It’s a piece of code which expands Ansible core functionality.

E.g.: – Connection plugins, Filter plugins and Callback plugins, etc

Collections: – It’s a format through which ansible content gets distributed. It may be a playbook, role, mode or plugin.

AAP: – AAP stands for Ansible Automation Platform, which contains enterprise-level features. And it integrates the Ansible ecosystem: ansible-core, awx, galaxy, and so on.

Playbook: – Playbook contains plays written in YAML. A single playbook may contain multiple tasks.

Plays: – Plays contain variables, roles and an ordered list of tasks (which should run repeatedly)

We can map managed nodes (hosts) to tasks.

Roles: – Using Role we can group multiple tasks together.

Eg: – We can create one role for multiple tasks, one for multiple variables, one for multiple handlers, etc

Tasks: – It specifies which action to carry on managed hosts. The task gets executed using the ad-hoc command.

Handlers: – These are the tasks which runs when notified.

Variables: – We can assign value to it. Variable name should contain letter, number and underscore. But should start with letter.

Ansible Facts: – We used facts to get data from Managed nodes.

Two types of facts: –

Default facts

Custom facts

Ansible Vaults: – Ansible Vault is a secure store for storing passwords and encrypted files

Ansible Galaxy: – It’s an online repository for Ansible roles.

                                                        For Information & classes Call:  7370000325
                                                         Registration Link: Click Here!

 

Author:-
Amol Shende
Linux Trainer

IT Education Centre Placement & Training Institute

© Copyright 2023 | IT Education Centre.