Ansible, Part 1 of many

5 months ago, I got the opportunity to dive headfirst into the DevOps world. I’ve always played on the edge of IT and Software development, but this was the first time I’ve gotten to focus deeply on DevOps. It’s been a challenging and rewarding 5 months so far and I’ve gotten to learn a number of DevOps tools. One of our main tools is Ansible.

This is the start of my series on Ansible and over the next few months I will will provide

  • A high level overview (This post)
  • in-depth explanation of Inventory, Variables, and Modules (Part 2)
  • Getting Ansible Setup (part 3)
  • Ad-hoc Ansible Examples (Part 4)
  • Creating playbooks (Part 5)
  • Inventory, Hosts, Facts and Delegation (part 6)
  • Under the hood (part 7)
  • Security and Vault/Password Management (Part 8)
  • Debugging Playbooks (Part 9)
  • Advanced Playbook Features (Part 10)
  • Advanced Playbook Design (Part 11)
  • Building Modules (Part 12)
  • Tips, Tricks and Best Practices on using Ansible.(Part 13)
  • Ansible Tower (Part 14)

So what the heck is Ansible

In simplest terms, it’s an automation engine and library of modules. It’s kinda like C#, you’ve got a runtime (engine) and a class libraries (modules). With C#, you can use these components to create either more components or an application. With Ansible, you create playbooks which can use other playbooks, plays and modules to accomplish a task often in a repeatable manner. Also like C#, these a million and one things you can do accomplish a task, some ways are better than other while some are just about trade-offs. It can be used to accomplish a variety of goals such as provisioning, configuration management, app deployment, continuous delivery, security and compliance, orchestration and more. It also has a very rich module library for integrating with other systems like AWS, Cisco, F5, GCP, vmware, windows, and many more.

Ok, so why should I use Ansible

If you have repeatable tasks, and you do, you can leverage Ansible to automate and simplify these task and get back to more creative and rewarding work. In reality, why you’d use Ansible is to automate the repetitive tasks to ensure they are done automatically and consistently. This could be doing CI or Deployments, or maybe it’s automating updating images for AWS/Azure or maybe you need to collect information on remote systems for auditing and compliance purposes. Ansible is so flexible that the reason you’d use it really depends on what you are trying to accomplish.

What if my company has custom systems to integration with

That’s not a problem. While there are a ton of integrations already developed, you can develop your own components using wither powershell or python. There’s a small bit of ceremony on how to write these modules, it’s fairly easy to learn. My experience already included adding modules to integrate with 2 different systems, 1 3rd party and 1 internally developers.

But what about cost and support

Well it’s open source, but there is premium support available though RedHat. There’s a ton of documentation available and a great active community that holds various events and meetups.

Now onward to Part 2.