What are the use cases for Ansible?

1.1K    Asked by SiyaKohli in Devops , Asked on Dec 1, 2019
Answered by Siya Kohli

Ansible is the key enabler for achieving operational excellence for IT organisations through automation.

Infrastructure Provisioning - Ansible allows you to manage and model infrastructure through YAML based templates. It dynamically detects the infrastructure regardless of whether it is hosted on cloud, containers or data centres. Let's say you want to spin up 20 AWS EC2 instances with different OS and set of hardware configuration, then you can define all these in YAML playbook with their configurations(AMI, VPC, Subnet, OS, CPU, Memory etc) and provision them quickly rather than doing it through AWS Console.

Configuration Management - Ansible allows you to apply updates or changes to the system remotely. It also maintains consistency by keeping the previous state of system. For e.g. If you want to install Java, Tomcat on 20 EC2 instances created above, then you can create a role and execute on all instances remotely through a single instance without logging into each instance.

Application Deployment - Ansible allows you to build, test and deploy your application from Dev to Production. For e.g. You can split your inventory into different groups, then it can deploy the application in Dev/Stage environment and execute test there, if they pass then it can be deployed in Production as well. All this can be done without manual intervention on a large number of machines.

Orchestration - Ansible allows to manage different moving parts of an application to be deployed efficiently. For e.g. You want to deploy a Hadoop cluster where you have Namenodes, Datanodes and other components which have their own configurations and sequences for deployment and upgrade.



Your Answer

Interviews

Parent Categories