This lesson will introduce you to what ansible is, the basic overview of ansible, the features of ansible, and the advantages of ansible.
Ansible is an easy to deploy software used for automation and orchestration of IT tasks. Tasks such as configuration and management of numerous computers in a network environment.
The ansible software is similar to a server-client based system. To use ansible, there must be at least two nodes.
One is the Ansible control node, also known as the controller. This is the node where the ansible software will be installed, and the other nodes are the managed hosts, that is, the hosts that the ansible node will manage.
To understand better, let’s explain further with the diagram showing the ansible architecture below.
From the diagram, it is evident that the ansible environment is basically made up of ansible control node, inventories, plugins, managed hosts, modules, and playbooks.
So, what are these?
Like I mentioned above, the control node or the controller is where the ansible tool will be installed.
The Ansible Inventories contains the number of hosts, individually or in groups that the ansible control node will manage.
For example, if one needs to install and configure the httpd service on a host or group of hosts by automation using the ansible software, ansible will have carry out these tasks on the hosts specified in the inventory file, else, these tasks will not be done.
What connects the ansible control node and the managed hosts is the plugin. The connection plugin is responsible for the interaction between the control node and the managed hosts.
The default ansible connection plugin is SSH. SSH is sufficient for the connection of Linux machines and the python programs in the Linux machines can easily interpret the ansible operations.
There are also other plugins such as Action, call-back, etc, and ansible comes with a number of its plugins.
If the managed hosts are windows or windows related instances, other plugins will be used in this case because windows don’t have SSH.
Modules are small programs or rather units of code, python code specifically, with tasks that are executed from a control node against/on managed hosts using the ansible ad hoc commands or ansible playbook.
In summary, modules are basically tasks, and the ansible feature used to execute the tasks are the ad hoc commands or playbooks.
Without ad hoc or playbooks, modules will not be executed.
The ansible software by default has various modules and with modules comes arguments.
As we go on in the course of study, you will understand better and you will also understand how to use modules and arguments in ansible.
Ansible playbook is a feature in ansible that contains a unit of scripts with instructions and tasks. These scripts are simple files written in YAML.
A playbook contains different plays with different tasks and these tasks can be orchestrated step by step at the same time or at different times depending on how it is defined in the playbook.
A playbook is a most sought-after feature while using ansible and it is what makes ansible popular.
Ansible ad hoc is the basic or simple ansible commands used to execute ansible tasks.
Having understood all these basic ansible features listed above, from the diagram above, the basic overview of the ansible architecture is:
1. Ansible will be installed on the control node.
2. The inventory file(s), which contains the managed hosts will be created on the control node.
3. Playbook file(s) will be created. The playbook data will contain plays and modules/tasks
4. The SSH plugin will be responsible for the connection between the control node and the managed nodes. This makes Ansible is agent-less
If you like this article, you can support us by
1. sharing this article.
2. Buying the article writer a coffee (click here to buy a coffee)
3. Donating to move our project to the next level. (click here to donate)
If you need personal training, send an email to firstname.lastname@example.org
Your feedback is welcomed. If you love others, you will share with others