In this blog post, I’ll review and list the five main components of Ansible and what they do.
About Ansible
Ansible Is an open-source agentless system and deployment tool that uses the concept of Infrastructure as a code.
Components
Ansible has five main components that help us manage our Infrastructure, and they are listed below.
Control node
This is the brain of Ansible, and it can only run on a Linux machine (not Windows).
The control node has all the configuration files and list of machines that are under management.
All jobs are running from the control node, and you can run this role from a macOS machine.
Managed node
Any machine that is under the Ansible Control node falls under the definition of a managed node.
This can be a Linux, macOS or a Windows machine.
Host inventory
Any managed node that Ansible manages needs to be listed inside an inventory file.
The default inventory file /etc/ansible/hosts
Ad-hoc commands
These commands are commands we run against managed nodes directly from the Bash shell environment.
Playbooks
Ansible playbooks are YAML files that contain commands, configurations, variables and tasks that we need to run against our managed hosts.
Module
All Ansible commands and playbooks use modules which translate into Linux commands like yum, PowerShell (Windows).
Without modules, Ansible cannot manage, deploy and deploy services and configurations on machines.