Real Use Case of Ansible

Skabhi
5 min readDec 29, 2020

πŸ‘‰ Introduction of Ansible

Ansible is the automation tool which is provided by the RedHat. Ansible is an advance tool or we can say it a latest highly recommended tool these days which is used for automation.

Automation is a big word which cover all about how to make automate the different technology with the help of some advance tool like ansible, or with the help of programming languages like python.

Ansible use the Python programming language in the backend.

β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€”

πŸ‘‰ Scaling

Scaling means keep the eyes on the running program/tools. Scaling is very important as the industrial use case because their is many servers/systems are running together and each have some uses as company prospective so if a system is goes down then who inform us which system is goes down so here is the main role of scaling come into play.

β†ͺ How auto-scaling is used in Ansible

Ansible have the capability of auto-scaling and also capable to provisioning (launch or terminate the OS/systems whenever required).

Ansible can increase or decrease the demand by its features of the Ansible Tower which is very useful.

β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€”

πŸ‘‰ How ansible works?

In Ansible, there are two categories of computers: the control node and managed nodes. The control node is a computer that runs Ansible. There must be at least one control node, although a backup control node may also exist. A managed node is any device being managed by the control node.

Ansible works by connecting to nodes (clients, servers, or whatever you’re configuring) on a network, and then sending a small program called an Ansible module to that node. Ansible executes these modules over SSH and removes them when finished. The only requirement for this interaction is that your Ansible control node has login access to the managed nodes. SSH keys are the most common way to provide access, but other forms of authentication are also supported.

β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€”

πŸ‘‰ Ansible Playbook

While modules provide the means of accomplishing a task, the way you use them is through an Ansible playbook. A playbook is a configuration file written in YAML that provides instructions for what needs to be done in order to bring a managed node into the desired state. Playbooks are meant to be simple, human-readable, and self-documenting. They are also idempotent, meaning that a playbook can be run on a system at any time without having a negative effect upon it. If a playbook is run on a system that’s already properly configured and in its desired state, then that system should still be properly configured after a playbook runs.

β†ͺ Limitation of Ansible Playbook

We can’t run more than one YAML file in by a single go (not in parallelly but in serially) means we can run it one by one by manually but can’t set the continuous files in a row.

But in the Ansible Tower we can overcome this problem means with the help of ansible tower we can run the multiple YAML files not in parallelly but in serially (only we have to set it in a proper manner which we want).

β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€”

πŸ‘‰Ansible Tower / Real Use Case of Ansible

Ansible Tower is the real use case of the Ansible which is actually used by the industrial purpose for the automation, autoscaling and many more.

Ansible Tower (formerly β€˜AWX’) is a web-based solution that makes Ansible even more easy to use for IT teams of all kinds. It’s designed to be the hub for all of your automation tasks.

Tower allows you to control access to who can access what, even allowing sharing of SSH credentials without someone being able to transfer those credentials. Inventory can be graphically managed or synced with a wide variety of cloud sources. It logs all of your jobs, integrates well with LDAP, and has an amazing browsable REST API. Command line tools are available for easy integration with Jenkins as well. Provisioning callbacks provide great support for autoscaling topologies.

β†ͺ Important Features of Ansible Tower

Some of the important features of Ansible Tower are listed below. The full feature list is available off the Ansible website.

  1. Role Based Access Control : you can set up teams and users in various roles. These can integrate with your existing LDAP or AD environment.
  2. Job scheduling : schedule your jobs and set repetition options
  3. Portal mode : this is a simplified view of automation jobs for newbies and less experienced Ansible users. This is an excellent feature as it truly lowers the entry barriers to starting to use Ansible.
  4. Fully documented REST API : allows you to integrate Ansible into your existing toolset and environment
  5. Tower Dashboard : use this to quickly view a summary of your entire environment. Simplifies things for sysadmins while sipping their coffee.
  6. Cloud integration : Tower is compatible with the major cloud environments: Amazon EC2, Rackspace, Azure.
  7. Real Time Job Status Updates : Within Ansible Tower, playbook runs stream by in real time. As Ansible automates across your infrastructure, you’ll see plays and tasks complete, broken down by each machine, and each success or failure, complete with output. Easily see the status of your automation, and what’s next in the queue.
  8. Multiple-playbook workflows : Ansible Tower Workflows allow you to easily model complex processes with Ansible Tower’s intuitive workflow editor. Ansible Tower workflows chain any number of playbooks, updates, and other workflows, regardless of whether they use different inventories, run as different users, run at once or utilize different credentials.
  9. Scale Capacity with Tower Clusters : Connect multiple Ansible Tower nodes into a Ansible Tower cluster. Ansible Tower clusters add redundancy and capacity, allowing you to scale Ansible automation across your enterprise, including with reserved capacity for certain teams and jobs, and remote execution for access across network zones. Current Ansible Automation architecture can scale to 200K nodes with 20 cluster nodes.
  10. Integrated Notifications : Stay informed of your automation status via integrated notifications. Notify a person or team when your job succeeds, or escalate when jobs fail. Send notifications across your entire organization at once, or customize on a per-job basis. Connect your notifications to Slack, Hipchat, PagerDuty, SMS, email, and more β€” or post notifications to a custom webhook to trigger other tools in your infrastructure.

β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€” β€”

Thanks for learning. If you have any suggestion or any query then feel free for suggest and ask.😊😊

#RedHat #vimaldaga #righteducation #educationredefine #rightmentor #linuxworld #makingindiafutureready #righeducation #arthbylw #ansiblebylw #ansible #expertsession #sreejith #arun #practicalimplementation #rh294

--

--