How Ansible solves industry use cases?

Abhishek Biswas
8 min readApr 4, 2021

--

What is Ansible?

In brief, ansible is a universal language, unraveling the mystery of how work gets done. Turn tough tasks into repeatable playbooks. Roll out enterprise-wide protocols with the push of a button.

Why Ansible?

Ansible provides support for integrating development and operations in contemporary test-driven application design. It provides a stable environment for the development and operations team, thereby leading to smooth orchestration. Ansible automation helps considerably with the representation of Infrastructure as Code (IAC).

Advantages of Ansible:

1.) Simple to Learn

The foremost mention among advantages of Ansible refers to its simplicity. The simplicity is not only meant for professionals but also for beginners. It is easy to learn, and so, users could learn to use Ansible quickly along with better productivity. Ansible receives the support of comprehensive and easily interpretable documentation.

2.) No Dependency on Agents

The next important addition among the benefits of Ansible refers to its agentless nature. Ansible manages all the master-agent communications through Standard SSH or Paramiko module. The Paramiko module is a Python implementation of SSH2 and is crucial for managing nodes. Therefore, Ansible does not require any form of agents installed on remote systems for ensuring management. As a result, maintenance overheads and performance degradations reduce considerably by huge margins with Ansible.

3.) Playbooks are written in YAML

The use of Playbooks in Ansible is also another reason for the major advantages of Ansible. Playbooks are Ansible configuration files, and the language for writing them is YAML. The interesting factor, in this case, is that YAML is a better alternative for configuration management and automation.

4.) Ansible Galaxy

Another notable entry in the Ansible best practices refers to the Ansible Galaxy. Ansible Galaxy is a portal that acts as the central repository for locating, reusing, and sharing Ansible-related content. The best advantage of Ansible Galaxy is in the example of downloading reusable Roles for installing application or server configuration. The downloads are ideal for use in a particular user’s playbooks and can contribute substantially to an increase in deployment speed.

Disadvantages of Ansible:

1.) Insufficient User Interface

The first entry in the disadvantages of Ansible is the crude user interface. Ansible was initially a command-line only tool. The first effort of Ansible at making a user interface was with AWX graphical user interface. The other component in the UI was the REST endpoint that is meant for easier infrastructure management.

2.) Lack of any Notion of State

Another prominent mention among the disadvantages of Ansible is the lack of any notion of state. Ansible does not have any notion of state like other automation tools such as Puppet. Ansible does not track dependencies and simply executes sequential tasks and stops when tasks finish, fail, or any error comes.

3.) Ansible does not have Experience

The lack of enterprise support experience also draws down the appeal of Ansible. Ansible does not have a full-fledged working experience with large enterprises like its competitors, such as Puppet and Chef (Read: Chef vs Puppet). Even though Ansible claims the facility of enterprise-grade extended support options, limited practical experience reduces the accountability of Ansible.

4.) Ansible is New to the Market

Finally, you can note one of the most common entries in Ansible advantages and disadvantages as a prominent setback of Ansible. Ansible is new to the market, unlike its renowned competitors. As a result, it does not have a large developer or user community. Furthermore, the new presence of Ansible on the market implies the possibilities of undiscovered bugs, software issues, and edge scenarios.

Uses of Ansible

Ansible has a long list of potential methods and applications. The top uses of Ansible are:

1. Orchestration

Orchestration includes combing many different elements into a whole excellent operation. Ansible helps in making the orchestration task easier. With the use of provisioning and automated workflows, it makes orchestration simple. Once the user defines the infrastructure with the use of Ansible playbooks, the user can make use of the same orchestration anywhere required.

2. Application Deployment

Application deployment is another important use of the ansible platform. It allows users to deploy multi-tier apps easily and quickly. There is no need for any custom code for automating the systems of the users. Only by listing the tasks and writing the playbooks, the automation can be done. With Ansible, there is no requirement of manual configuration.

3. Cloud Provisioning

Automating the life cycle of the user’s application requires automating the provisioning of the infrastructure. Ansible allows the users to provision virtualized hosts, cloud platforms, servers, and other network devices.

4. Security and Compliance

Ansible can help in ensuring security and compliance. When a user configures the security details on the control machine and runs the associated playbook, the remote hosts automatically update as per those security details. It enables the users to monitor all the machines for security compliance manually continuously. Ansible, however, does not allow retrieving of the user ID and password of the admin in case of additional security needs.

Use Cases of Ansible

Windows

Windows

Users and customers love Ansible’s simple, agentless, powerful automation that allows them to model and deliver any configuration, any deployment, any environment across their IT infrastructure.

Ansible knew that the key was to bring the same simple, agentless paradigm to managing Windows, while still feeling native to Windows administrators. Ansible’s native Windows support uses Windows PowerShell remoting to manage Windows like Windows in the same Ansible agentless way that Ansible manages Linux like Linux.

With Ansible’s native Windows support, you can, out of the box:

  • Gather facts on Windows hosts
  • Install and uninstall MSIs
  • Enable and disable Windows Features
  • Start, stop, and manage Windows services
  • Create and manage local users and groups
  • Manage Windows packages via the Chocolatey package manager
  • Manage and install Windows updates
  • Fetch files from remote sites
  • Push and execute any PowerShell scripts you write

You can connect to and automate Windows using local or domain users, and soon you’ll be able to use Windows ‘runas’ support to execute actions as the Administrator, just as you would use ‘sudo’ or ‘su’ on Linux.

Plus, with Ansible’s easy extensibility, you can write your own modules in PowerShell and extend Ansible for whatever other functionality you need. Ansible users have written modules for managing filesystem ACLs, managing Windows Firewall, and managing hostname and domain membership, and more.

And when you need to roll this out across your team, Red Hat® Ansible® Tower works out of the box with Ansible’s Windows support.

AWS

From the beginning, Ansible has offered deep support for AWS. Ansible can be used to define, deploy, and manage a wide variety of AWS services. 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.

AWS

Out of the box, Ansible has nearly 100 modules supporting AWS capabilities, including:

AMI Management
Autoscaling Groups
CloudFormation
CloudTrail
CloudWatch
DynamoDB
ElastiCache
Elastic Block Store (EBS)
Elastic Cloud Compute (EC2)
Elastic IPs (EIP)
Elastic Load Balancers (ELB)
Identity Access Manager (IAM)
Kinesis
Lambda
Relational Database Service
Route53
Security Groups
Security Token Service
Simple Storage Service (S3)
Virtual Private Cloud (VPC)

Ansible also has over 1,300+ additional modules to help you manage every aspect of your Linux, Windows, UNIX, network infrastructure, and applications — regardless of where they’re deployed. With Ansible, one common language can be used to describe everything deployed in your cloud (and your enterprise).

Control Cloud Sprawl with Dynamic Inventory

Now that you have deployed applications into the cloud, how do you keep track of what you have? Keeping accurate track of deployed infrastructure is a critical part of ensuring security policies are always followed and systems are properly managed through their lifecycles. You don’t want to be paying for services you don’t need.

With Red Hat® Ansible® Tower’s cloud inventory synchronization, you can know exactly what AWS instances you have no matter how they were launched. Simply enter your AWS credentials and your entire AWS infrastructure can be made available as resources to use in your Ansible automation jobs.

Safely Automating at the Speed of Business

When you only had one or two engineers working in AWS, everything seemed easy. Now that you’ve got ten or more, you need controls in place that restrict users’ ability to modify certain environments. Ansible Tower delivers with its extensive set of role-based access controls that ensures users will only have access to the AWS resources (networks, systems, security groups, etc.) that they require for their job. Plus, Ansible Tower encrypts credentials such as AWS and SSH keys so that you can delegate simple automation jobs to junior employees without giving out the keys.

Migrations Made Easy

Your CIO just mandated that you have to migrate dozens of workloads to AWS. With Ansible, you can use the same simple playbook language to manage your infrastructure and deploy your application. Use Ansible to define your application locally. Once you can repeatedly deploy that application locally, re-deploying it to a different infrastructure is as straightforward as defining your AWS environment, and then applying your application’s playbook. No more surprises.

Juniper Networks

Juniper Networks is an industry leader in network innovation. Juniper creates innovative technologies that help customers connect their ideas, compete and thrive in an ever-changing world.

Juniper Networks

Integrated Solution

The combination of Ansible and Juniper’s automation and orchestration tools bring together the knowledge and expertise of experienced IT solutions developers, operators, and administrators across organizations.

The joint solution addresses the most common applications of automation and orchestration in the management and provisioning of IT resources, including:

  • Configuration automation
  • Test-driven networking
  • Continuous compliance

The joint solution includes Ansible modules developed specifically for Juniper Networks Junos OS.

There are many more Big MNC’s which uses ansible for managing there infrastructure, can refer to the official ansible website for more use cases.

Thanks for reading…..

--

--