Introduction to Ansible and Ansible Tower

Milind Rastogi
5 min readDec 29, 2020


Ansible is a configuration management tool but we can do provisioning also.

Ansible is a software tool that provides simple but powerful automation for cross-platform computer support. It is primarily intended for IT professionals, who use it for application deployment, updates on workstations and servers, cloud provisioning, configuration management, and nearly anything a systems administrator does on a weekly or daily basis. Ansible doesn’t depend on agent software and has no additional security infrastructure, so it’s easy to deploy.

How Ansible works

Ansible is a tool/software . Ansible work on concept of declarative language. we have to tell Ansible what to do , it automatically detect the command for it that support that server.

a. Controller node — system where you write the code of Ansible and run the code of Ansible.

b. Managed node — System to whom you would like to configure by Ansible.

c. Inventory — Inventory is like a database having information of Managed Node/hosts IP’S. Provide Inventory to Ansible.

Note — That’s the reason why Ansible is known as “Agentless”. Because controller node is going to managed node so in this it don’t require any agents on managed nodes.

d. Idempotence-
Ansible first check the current state of package in managed node , if it is there then it will not install the package (that is our desire) . If it is not there then in this case it will install the package on managed node.

This concept is known as “idempotence”. Ansible works on “idempotence”.

e. Ansible use “ssh” protocol for maintaining connection between controller node and managed node only if both controller node and managed node have a Operating system “Linux”

f. Ansible intelligence comes from its module. There are many module available for Ansible for different different use case.

g. For automation through Ansible-
a. Command
Write the ansible commands one by one. These command are known as Adhoc commands.
b. Script
Write all the command in a program file /script. This file is known as Playbook.

h. The language that is used to write commands in playbook is YAML.

i. In play book the commands we write are known as tasks. Task is for the host . Task is known as play. Multiple task/play we have for multiple hosts. That’s why file containing play/task is known as playbook.

j. For run the playbook of ansible , command is —

ansible -playbook “playbook-name”

About Ansible Tower

One of the major gripes from Ansible users is that it didn’t have a proper GUI. And that’s putting it mildly — the GUI was so bad that in the early days it wasn’t even properly synced to the CLI, meaning that the CLI and GUI could give you 2 different query results about the state of a certain node. This was an especially critical issue because good UI is important for occasional and new users to get comfortable and familiar with an application, before diving into the complexities of the CLI and playbook creation. Ansible itself was (and still is) rather new, so most of its users were by definition new users.

Ansible Tower, previously called the AWX project, is the fix to this problem. It is a comprehensive web-based UI for Ansible, containing the most important Ansible features, especially those that render better as graphical rather than text-based output, such as real-time node monitoring.

Ansible Tower is the easy-to-use UI and dashboard and REST API for Ansible. Centralize your Ansible infrastructure from a modern UI, featuring role-based access control, job scheduling, and graphical inventory management. Tower’s REST API and CLI make it easy to embed Tower into existing tools and processes. Tower now includes real-time output of playbook runs, an all-new dashboard and expanded out-of-the-box cloud support.

Some of the important features of Ansible Tower are listed below.

1. Ansible Tower Dashboard: It displays everything which is going on in your Ansible environment, such as the inventory status, the recent job activity, the hosts, and so on.

2. Multi-Playbook Workflows: It allows to chain any numbers of playbooks, any way of the usage of different inventories, runs different users, or utilizes various credentials.

3. Real-Time Job Updates: Ansible can automate the complete infrastructure. Also, you can see real-time job updates such as plays and tasks broken down by each machine either been successful or failure. Therefore you can see the status of your automation and know what’s next in the queue.

4. Scale Capacity with Cluster: You can connect multiple Ansible Tower nodes into an Ansible Tower cluster as the clusters add redundancy and capacity, which allows scaling Ansible automation across the enterprise.

5. Self-Service: You can launch playbooks with just a single click through this feature.

6. Remote Command Execution: With this command, you can run simple tasks such as restart any malfunctioning service, add users, reset passwords on any host or group of hosts in the inventory.

7. Manage and Track Inventory: It manages your entire infrastructure by pulling inventory from public cloud providers such as Microsoft Azure, amazon web services, etc.

8. Integrated Notification: This notifies you when a job succeeds or fails across the entire organization at once, or customize on a pre-job basis.

9. Schedule Ansible Jobs: It schedule different kinds of jobs such as playbook runs, cloud inventory updates, and source control updates to run according to the need.

10. REST API and Tower CLI Tool: Every feature present in Ansible Tower is available through the Ansible Tower’s REST API, which provides the ideal API for the systems management infrastructure. The Ansible Tower’s CLI tool is available for launching jobs from CI systems such as Jenkins, or when you need to integrate with other command-line tools.

In short, Ansible Tower is a remarkably useful add-on to Ansible, able to do much of what can be done on the CLI. It will complement, not replace, the main application by automating and presenting some of the main tasks graphically — especially the monitoring-dashboard types of tasks. As a major bonus, it also greatly helps to reduce the intimidation factor for those new to Ansible by presenting a much easier to understand visual tool. But for playbook creation, Ansible’s CLI is still your best option.