Introducing Ansible

In this article, I would like to provide you with complete information about ansible applications, advantages and disadvantages, and in simple, non-professional language. Ansible is an open source and automated platform. Installing it is very simple and at the same time a powerful platform. Ansible can help you with Configuration Management, Application Deployment and Task Automation. It is also used for things that need to be executed in order and a chain of events is performed on multiple servers. For example, if we have 4 servers and want to install and config Nginx for everyone, using Ansible and only once running the corresponding command, nginx will be installed on all 4 servers. Ansible is rapidly advancing in the world of automating tools. The following will explore some of the reasons for Ansible’s popularity.

Advantages of Ansible:

1) It’s free: Ansible is an Open source tool.
2) Setting up and using it is very simple: to use an Ansible playbook (including information about systems to be managed, as well as instructions and steps to be implemented), there is no need to have specific programming skills.
3) It’s powerful: With Ansible, you can also model complex IT workflows.
4) Flexible: The entire application environment is customizable regardless of its location with the help of Ansible. You can also personalize it according to your needs.
5) Agentless: To automate, there is no need to install any other software or firewall port, nor does it require the installation of a separate management structure.
6) Efficient: Given that there is no need to install any additional software, there is more room for app resources on your server.

What can Ansible do?

Configuration Management:

It is designed to simplify, reliably and adapt Configuration Management. If you’re familiar with IT, you can adapt very quickly. Configuration Ansible is a simple description of infrastructure data that can be read both by humans and by machine. To start managing the system, you only need a password or secure Socket Shell key of a network protocol. As an example of the easyness of Configuration Management by Ansible, assuming you want to install an updated version of a software, on all your company’s devices, you just need to have all the IP addresses of nodes (remote hosts) and finally install the software on all devices by writing a playbook and running it from your device.


Just as a musical orchestra turns notes produced by all different instruments into a coherent work of art, orchestration is also tasked with cohering different elements in order to create a good and complete operation. For example, by deploying the app, in addition to front-end, backend services, databases, networks and storage locations, etc., they must also be managed. It should also ensure that all tasks are done in order. Ansible makes orchestrating tasks easy by using things like Automated Workflows and Provisioning. Also, thanks to the portable Ansible playbook, once you’ve defined your infrastructure using playbooks, you can use the same orchestration again wherever you need to.

Application Deployment:

When a program with Ansible is defined and deployed by Ansible Tower (the same Ansible at the enterprise and web-based level, to manage the organization with an interface that provides a dashboard with a summary of the status of all hosts), servers can effectively manage the entire production cycle of the program, i.e. from development to production. You don’t need to write code to automate systems. Just list the tasks that need to be done by writing a Playbook, then Ansible understands how to get the system to the status you want; in other words, there’s no need to manually config apps on each device individually. When running the main system (monitor system) of a Playbook, Ansible uses SSH to communicate with remote hosts and execute all tasks.


The first step in automating the program cycle is to automate provisioning or support the program’s infrastructure. With the help of Ansible, cloud platforms, virtual hosts, network devices and Bare-metal servers (a computer or network system in which a virtual machine is installed directly on the hardware rather than on the host operating system (OS).


When Security Policy is defined in Ansible, checking and improving site Security Policy can be integrated into other automated processes. It will also accompany development in all future developments. That is, you once config your security detail on the main system and these settings are automatically applied to all other systems. In addition, all administrators’ credentials (ID and password) stored in Ansible. It should be noted that it cannot be retrieved by any user in Plain text.


As you can see in the chart above, the Ansible automating engine is directly associated with users who write Playbooks to run it. It also interacts with cloud services and management management databases (CMDB).
The automation architecture includes:


There is a list of hosts (systems) with their IP addresses, servers, databases, etc. that need to be managed. Ansible then starts communication through a communication protocol such as SSH for UNIX, Linux or Networking and WinRM for Windows system.


The programming interface in Ansible, which is used as a communication platform, for Cloud services, public or private services.


Modules run directly on remote hosts via Playbooks. They can also control system resources such as services, packages, or files and execute system commands. These are done by taking the necessary steps on system files, installing packages, or communicating API with network services.


Plugins, allowing Ansible Tasks to run as a stage of application construction. Plugins are pieces of code that enhance the main function of Ansible. Ansible contains a number of handy plugins and you can easily write the plugin you need. Action plugins, for example, are pre-modules and can run tasks on the main system before calling modules. Cache plugins are also used to store Facts cache to prevent costly operations.

Apart from the above, there are a few other explanations in ansible architecture that we will discuss below:


Ansible can be used to automate different networks. Ansible uses the same simple and powerful IT framework to perform automating and development. To do this, a separate Data Model (e.g. a Playbook or Role) is used in this automating engine. It can also easily cover various network hardware.


Hosts in the Ansible architecture are systems that are automated by Ansible. Includes any device such as Windows, Linux, RedHat, etc.


Simple files are in YAML format that are responsible for describing tasks that must be executed by Ansible. They can identify Configs as well as manual steps. Playbooks have the ability to perform tasks, in sync or asynchronously.


It is a repository that acts as a data warehouse for IT installations. Data on a set of IT sources (commonly known as sections (CI) as well as descriptions of relationships between these resources are kept in it.


A network on the Internet is for remote host servers that are used to store, manage and process data instead of local servers. With it, you can set up your resources and samples on the cloud and connect to your servers.

And in the end,

Ansible is a very simple automation IT engine that automates configuration management, Application Deployment, in-service Orchestration and many other IT requirements. Given that it doesn’t use additional security infrastructure, it’s easy to install and Config. Most importantly, it uses a very simple language (YAML, for Ansible Playbooks). With it, you can define the automating steps in plain English. Mirbazorgi’s website aims to help you learn and fix your problems by providing articles and practical experiences. Email me if you have any questions.