Automation with Ansible and Ansible Tower

Gauri Raskar
6 min readDec 29, 2020

Have a look at following questions

1]How Red hat and open source technologies can be used to respond challenges by business during pandemic

2]How automation can help respond some common business issues during pandemic

3]Everybody is trying to be digital and demand for IT services is increasing day by day so how can we automate deployment of IT services in fast and complaint manner?

4]How can we provide self services to users without causing any additional investment?

Let’s try to answer above questions…

The answer is ANSIBLE AUTOMATION, it is the most popular automation tool on github with million downloads and thousands of contributers.

What is Ansible Automation?

Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy and maintain.

Ansible automates cloud provisioning, configuration management, application deployment, intra-service orchestration, and many other IT needs.

If you need to scale and keep up with the urgency of covid-19 automation can help

How to scale automation?

Focus on small tasks than on a big complex task: Organization or going through down time and investing more but at the same time they expect returns so automating many small tasks the more small task you automate the more you get knowledge and you will have foundation of automated process that can become the building block of more complex automation projects

We should review what others have automated: Study what task people automate the most and how evaluate how much is applicable to our IT environment and how much we have to change to adapt the automation workflow to it, Find online market places for automation like “ANSIBLE GALAXY” Ansible Galaxy is the community hub for sharing automation with everyone.

Treat automation like software: Automation tool like ansible are easier to write, understand and troubleshoot and if it is easier to understand more people will use it in their expertise domain

Think out of the box: an IT operations automation strategy can help organization improve existing process with automation organizations can save time increase quality improve employee satisfaction and reduce cost of their organization.

Let’s go through some practical use cases and demos

Here are some basic use cases of provisioning with Ansible

Before use cases let’s look at some basic terms

What is provisioning?

Provisioning is the process of setting up IT infrastructure. It can also refer to the steps required to manage access to data and resources, and make them available to users and systems. Provisioning is not the same thing as configuration, but they are both steps in the deployment process.

What is ansible tower?

Ansible Tower is an enterprise automation solution build on top of ansible engine, some of the enterprise features provided by ansible tower are API , web-user interface, richer role based access control, scheduling features ,can integrate with third party solutions, and it is secure platform where you can share your sensitive information.

now, let’s look at use-case for ansible tower

What happens to our automation when our ansible server goes down?

Ansible server is our control node and if control node goes down it cause single point of failure(A SPOF or single point of failure is any non-redundant part of a system that, if dysfunctional, would cause the entire system to fail.) and because of this our entire automation fails.

This is where Ansible Tower comes into play, it gives you clustering features, that is we can have multiple ansible towers deployed and they share a common database that is postgresql and using that we will be able to have redundancy for our automation and scale our automation even if our control node fail.

Basic use-cases of ansible: Ansible can be used for configuration management, provisioning, security remediation, application deployment, orchestration

Ansible use-cases

Ansible with AWS

What is AWS?

Amazon Web Services (AWS) is a secure cloud services platform, offering compute power, database storage, content delivery and other functionality to help businesses scale and grow. Running web and application servers in the cloud to host dynamic websites.

When you deploy an application into AWS, you will soon realize that the cloud is much more than a collection of servers in someone else’s data center. You now have a fleet of services available to you to rapidly deploy and scale applications. However, if you continue to manage AWS like just a group of servers, you won’t see the full benefit of your migration to the cloud. Ansible automation can help you manage your AWS environment like a fleet of services instead of a collection of servers.

Even the most complicated of AWS environments can be easily described in Ansible playbooks. Once your AWS-based application environments are described with Ansible, you can deploy them again and again, easily scaling out to 100s or 1000s of instances across multiple regions, with the same results each and every time.

We chose Ansible as our first orchestration solution for its simplicity combined with power.

Jim Kleckner, VP Operations
Cloud Physics

Ansible with terraform

What is terraform?

Terraform is an open-source infrastructure as code software tool created by HashiCorp.

Terraform is an open-source infrastructure as code software tool that enables you to safely and predictably create, change, and improve infrastructure.

Automation tools don’t have to be competitive, great things can be achieved when you combine great tools together and collaborate. Learn how users of the HashiCorp stack can use Ansible to achieve their goals of an automated enterprise — through complimentary security, image management, post provisioning configuration, and integrated end to end automation solutions.

Terraform and Ansible have their fair share of similarities, along with some dissimilarities. Both tools help in deploying code and infrastructure in repeatable environments that possess complex requirements. However, if you take a practical approach, it is advisable to use Terraform for the purpose of orchestration and Ansible for configuration management.

You can use Terraform to call Ansible. Terraform is a great infrastructure provisioning tool, but you may have noticed that it doesn’t come with a config management system. That’s where Ansible comes in. We use Terraform to stand up virtual machines or cloud instances, and then we hand over the reins to Ansible to finish up the configuration of our OS and applications.

AWX and Ansible Tower

What is The AWX Project?

The AWX Project is an open source community project, sponsored by Red Hat, that enables users to better control their Ansible project use in IT environments. AWX is the upstream project from which the Red Hat Ansible Tower offering is ultimately derived.

AWX is the open source project behind Red Hat Ansible Tower, offering developers access to the latest features, and the opportunity to directly collaborate with the Ansible Tower engineering team. AWX is built to run on top of the Ansible project, enhancing the already powerful automation engine.

AWX is designed to be a frequently released, fast-moving project where all new development happens.

Ansible Tower is produced by taking selected releases of AWX, hardening them for long-term supportability, and making them available to customers as the Ansible Tower offering.

--

--