What is Ansible?
Ansible is an Open-source tool which helps developers on provisioning, configuration management and deployment of applications. Comparing with other automation tools, Ansible has an easy management system. It works against many systems of the infrastructure by selecting different parts from the Ansible’s Inventory. This inventory is stored as editable and versionable ASCII text files. Moreover, developers can use many inventory files in the meantime and also pull them from cloud or dynamic sources in different formats. Most of the time these are in YAML or INI.
Ansible utilities have the capability to control a set of files (directories) to manage other nodes. These nodes are managed by a central node through SSH. The location of these nodes is stored in the central node’s inventory. Sensitive data can be encrypted and store in the Ansible Vault.
Basic Concepts of Ansible
Following are a common set of basic ansible concepts.
- Control node — any machine with Ansible installed. The commands and playbooks can be executed by invoking
/usr/bin/ansible-playbook. There can be multiple control nodes.
- Managed nodes — the other nodes which are managed with Ansible control node. These are also known as
hosts. Ansible is not installed in these nodes.
- Inventory — is the file contains a list of hosts/managed nodes. So, this file is also known as
hostfile. Hosts are defined in the file with there IP address. The inventory is also used for organizing managed nodes, creating and nesting groups for easier scaling.
- Modules — is the units of code Ansible executes. A single module can be invoked with a task, while multiple modules are invoked using a playbook.
- Tasks — is the units of action in Ansible. A single task can be executed once with an
- Playbooks — is a file written in YAML which contains ordered lists of tasks. These also can include variables as well as tasks. Playbooks are easy to read, write, share and understand.
These are the very basic concepts in Ansible to get started with. Let us continue with How to write playbooks in the next article.
To join our community Slack 🗣️ and read our weekly Faun topics 🗞️, click here⬇