Ansible is an open-source solution managed by Red Hat, and it is part of the Red Hat Ansible Automation Platform. Ansible helps organizations to orchestrate and automate applications and environments from a central location to be consistent based on defined Ansible configuration files (playbooks. It uses YAML format, which means that it is easy to read, understand, and adapt to new requirements.
Because Ansible is an open-source project, we will use modules, which are how the platform interacts with products and features, and it has support for several technologies, including Linux, Windows, Microsoft Azure, NetApp, F5, Check Point, Aruba, Cisco, Google Cloud, and AWS. Long story short, we will be able to manage operating systems, infrastructure, applications, and networks from a single location.
One of the key features of Ansible is that it does not require an agent. The control node will connect to the target system using the protocols available as depicted in the image below and execute the instructions to make sure that the target system is configured based on the Ansible Playbooks/Roles/Ad-hoc commands (we will delve into these terms in more detail in this series).
Another key feature is that it can be used to address simple scenarios and complex ones using the same process across the border, which helps solutions architects and operations to use the technology.
Infrastructure-as-a-code (IaaC) is a theme that is here to stay, and we have explored several flavors of it here at TechGenix. I covered a few topics around DevOps in the Azure DevOps and ARM templates in my previous articles. In this article series, we will switch gears and explore Ansible and how to integrate it with existing solutions.
The previous diagram shows the Red Hat Ansible Engine, which can be installed on any Linux to use Ansible and start managing your environment. However, they have a solution that complements the Ansible Engine, and it is called Red Hat Ansible Tower, which is a web service that provides a web console and several other features to help the corporate environment to be more successful. Here are a few of the features:
If you are studying for your Red Hat Certified Engineer (RHCE) exam, then Ansible is must-have knowledge before taking the exam. The certification has changed, and the new exam is based in Ansible with a few topics from RHCSA (Red Hat Certified System Administrator).
We will explore several areas of Ansible here at TechGenix, but before going into details, we should get a good understanding of how it works from a high-level standpoint.
If we look at the diagram above, and we start from left to right, the first thing that we will notice is that the administrator can interact with Ansible in several ways using either a CLI (command line interface) or a web interface.
The command-line interface has two different approaches: We can send commands from the command-line using ansible executable file, and that is called Ad-hoc interaction. The second approach is using a playbook, which is a YML file that contains human-readable instruction to perform tasks on the desired hosts or group of hosts when calling playbooks, and we will use the ansible-playbook executable file.
If we want to use a web interface and have a more corporate group of features to improve Ansible, then we need to add Red Hat Ansible Tower, which is the software component that will take Ansible to the next level. It can be one or more servers to provide high-availability and fault tolerance, and it contains a PostgreSQL database on the backend.
The critical component that makes everything works is the Ansible Automation Engine, and it is comprised of key areas: Inventory, Modules, API and Connections, and Plugins.
One key feature that brings most of the components that we discussed briefly is the playbook. It is a list of tasks that will be executed in the order described in the document. For each task, we will have a module and the operations that we want to perform on the desired nodes. Since it is a YAML file, we know that it is easy on the eye, and even non-technical people can read and have a good understanding of what is going on.
In this initial article, we went through a high-level overview of Ansible and Ansible Tower. We covered their core components and how they interact with each other to manage nodes. In other articles, we will be going more in-depth in some of the Ansible components and how to use and apply them to real-world scenarios.
Featured image: Shutterstock / TechGenix photo illustration
RAID is a technique to virtualize independent disks into arrays for improved performance. Should you…
COVID-19 has changed everything, but once it disappears, we will not go back to how…
An Exchange server with a hybrid connection to Microsoft 365 is usually pretty seamless —…
Chatots are primarily thought of as consumer-facing solutions. They bring life to customer interactions by…
The newly uncovered Hakbit ransomware campaign spread via spear-phishing emails may indicate a shift in…
Credential stuffing is yet another weapon being used by cybercriminals. Here’s what credential stuffing is…