- Random Access Musings
- Posts
- Demystifying Ansible: A Michelin Star Chef in Your IT Kitchen (Part 3)
Demystifying Ansible: A Michelin Star Chef in Your IT Kitchen (Part 3)
Understanding Ansible’s Key Features: The Recipe for Efficient and Effective IT Automation

This is a series of posts about using configuration management with Ansible. You can read the previous entries at:
Hello Muser!
We're about to dive into the secret sauce of our series, Ansible. This open-source software provisioning, configuration management, and application-deployment tool is your reliable companion that brings order and consistency to your operations.
Why Ansible?
What's so special about Ansible? Why Ansible over other tools? Well, let's break it down:
Simplicity & Ease of Use: Ansible uses YAML (Yet Another Markup Language) for its playbooks, akin to the recipes in a kitchen. YAML is user-friendly, easy to read, write, and understand, making Ansible the go-to tool for system admins entering the world of configuration management.
Agentless Architecture: Ansible follows a push-based model utilizing the ever-present SSH protocol for delivering configurations, eliminating the need for an agent on the client-side, giving you a fuss-free and efficient deployment experience.

Talking the Talk
Diving deeper, let's learn some vocabulary and explore how Ansible’s key features can automate your daily tasks:
Fact Gathering: Much like a seasoned chef who adjusts the recipe based on available ingredients, Ansible operates with a similar level of sophistication. Ansible's fact gathering feature collects data (facts) about the systems it manages. This means that it can make informed decisions and adjust its 'recipe' based on the specific 'ingredients' each system has to offer. For example, it's like detecting which OS version is running on a system and installing the corresponding software package version, much like how one would use PowerShell to pull system information in Windows.
Modules: With over 450 specialized modules, these are Ansible's secret ingredients, each one responsible for a specific task. You can think of these as different spices or ingredients that give each dish its unique flavor. For example, Ansible's
apt
oryum
modules handle packages on Debian and Red Hat systems, just like how you manage OS updates for Windows systems with a WSUS server. Ansible's modules will allow you to add, delete, and change any pieces of the system you're managing.Tasks: Just as individual steps - chopping vegetables, marinating meat - use specific kitchen tools (knives, mixers), in Ansible, tasks are individual actions performed on the target host, like installing a package or starting a service. These tasks use Ansible's modules, the tools in our IT kitchen, to get the job done. A practical example might be rebooting a server or updating a user's password in Active Directory, each task leveraging specific modules to perform these actions. Each task brings you one step closer to your desired 'dish' - the ideal state of your IT system.
Playbooks: In the same way a recipe lists a series of steps (tasks) using various kitchen tools (modules) to create a dish, Ansible playbooks are essentially recipes for your IT environment. They define a series of tasks that use various modules to reach your desired system state. For instance, a playbook might automate the creation and setup of user accounts and groups on a VM, a sequence of tasks that echoes the processes in Active Directory or Exchange. This playbook, your well-defined recipe, ensures consistent setup and configuration across your infrastructure.
Roles: Think of roles as your sous-chef's well-prepared base sauce. This component can be added to various dishes across the menu, bringing consistency and saving effort. Similarly, in Ansible, a role is a mini-playbook - a standardized set of tasks that can be plugged into various main playbooks (our different dishes), like a set of commands you often use to set up a new user in Active Directory or configure a new Cisco switch. These 'recipes' can be transformed into roles, ready to be 'served' in multiple 'dishes' across your IT environment, ensuring consistency, efficiency, and reusability.
Inventory: Ansible's inventory is a catalog of nodes or machines that Ansible manages. In the kitchen, this would be the orders for the various dishes that have been ordered. Ansible uses the inventory to know exactly which systems it's managing and what needs to be delivered to the customer.
Our next session promises to take this exploration a step further, diving deep into the practical applications of Ansible. Before we meet next, I recommend
Setting up a Linux computer or VM
And preparing yourself to be amazed by what you can do!

If the world of Ansible has piqued your curiosity and you're eager for more, subscribe now or share this with someone who you think this will help! This will ensure you don't miss out on our next deep dive into Ansible playbooks, an episode you definitely don't want to miss!
Your questions, thoughts, and ideas aren't just welcome, they are necessary. They guide our conversations and make this exploration richer and more meaningful. So, don't hold back. PLEASE drop me a comment, a question, or an insight you might have!
Keep learning and keep growing,
Reply