IaC & Automation SeriesNew part

Ansible Mastery

Hands-on Ansible series: install, playbooks, roles, vault, dynamic inventory, Molecule testing, hardening, integrations.

Start with Part 1 → 25 parts · 5 hr 4 min total · read in order
Ansible Mastery
  1. 1 Ansible Automation Guide: From Basics to Production Part 1 of 25

    Ansible Automation Guide: From Basics to Production

    Managing a handful of servers by hand is fine. Managing fifty, or five hundred, with SSH and bash scripts gets old fast. Ansible turns infrastructure work…

    17 min read·Apr 2026

  2. 2 Install and Configure Ansible on RHEL and Debian Based Linux Part 2 of 25

    Install and Configure Ansible on RHEL and Debian Based Linux

    Managing a handful of servers by hand is fine. Past ten or fifteen, you start making mistakes: a config drifts on one box, a package gets…

    13 min read·Apr 2026

  3. 3 Ansible Ad-Hoc Commands: Quick Tasks Without Playbooks Part 3 of 25

    Ansible Ad-Hoc Commands: Quick Tasks Without Playbooks

    Not everything needs a playbook. Sometimes you need to check disk space across 50 servers, restart a stubborn service, or create a user account right now.…

    12 min read·Apr 2026

  4. 4 Ansible Inventory Management: Static and Dynamic Part 4 of 25

    Ansible Inventory Management: Static and Dynamic

    Ansible needs to know which servers to manage. That’s the inventory: a mapping of hostnames, IPs, groups, and variables that tells Ansible what exists in your…

    16 min read·Apr 2026

  5. 5 Your First Ansible Playbook: Step-by-Step Guide Part 5 of 25

    Your First Ansible Playbook: Step-by-Step Guide

    Managing two servers by hand is tedious. Managing twenty is a full-time job. Ansible playbooks turn that manual labor into repeatable, version-controlled automation that works the…

    16 min read·Apr 2026

  6. 6 Ansible Variables: Facts, Defaults, and Custom Setup Part 6 of 25

    Ansible Variables: Facts, Defaults, and Custom Setup

    Variables are what make Ansible playbooks reusable instead of disposable. Without them, you end up hardcoding hostnames, ports, and package names into every task, and any…

    15 min read·Apr 2026

  7. 7 Use Ansible Conditionals and Loops for Control Flow Part 7 of 25

    Use Ansible Conditionals and Loops for Control Flow

    The first playbook that does one thing to all hosts is satisfying. The second you need different behavior per OS, per environment, or per host, you…

    10 min read·Apr 2026

  8. 8 Use Ansible Handlers: notify, listen, force_handlers Part 8 of 25

    Use Ansible Handlers: notify, listen, force_handlers

    Ansible handlers explained: notify, listen, meta flush_handlers, and force_handlers in one tested nginx role on Rocky 10. Plus a 7-row gotcha table.

    11 min read·Apr 2026

  9. 9 Configure Dynamic Config Files with Ansible Jinja2 Part 9 of 25

    Configure Dynamic Config Files with Ansible Jinja2

    Config files are where most Ansible complexity lives. A static copy module works until you need different ports per host, different firewall commands per OS, or…

    9 min read·Apr 2026

  10. 10 Ansible Roles: Reusable Automation Packages Part 10 of 25

    Ansible Roles: Reusable Automation Packages

    Playbooks get unwieldy fast. What starts as a clean 30-line YAML file turns into a 400-line monster with duplicated tasks, inconsistent variable names, and no hope…

    15 min read·Apr 2026

  11. 11 Debug Ansible Playbooks: 10 Tools and Patterns That Actually Work Part 11 of 25

    Debug Ansible Playbooks: 10 Tools and Patterns That Actually Work

    Debug Ansible playbooks with -vvvv, check mode, --start-at-task, ansible-inventory, defensive asserts, and a real undefined-variable failure walkthrough.

    13 min read·Apr 2026

  12. 12 Ansible Vault: Encrypting Secrets and Passwords Part 12 of 25

    Ansible Vault: Encrypting Secrets and Passwords

    Sooner or later, every Ansible project hits the same wall: database passwords sitting in plain YAML, API keys checked into Git, and that one group_vars/all.yml file…

    11 min read·Apr 2026

  13. 13 Setup Ansible Dynamic Inventory for Auto Host Discovery Part 13 of 25

    Setup Ansible Dynamic Inventory for Auto Host Discovery

    Static inventory files work until you have more than a handful of servers. Once VMs spin up and down in Proxmox, instances launch in AWS, or…

    7 min read·Apr 2026

  14. 14 Test Ansible Roles with Molecule: Real Pitfalls and Fixes Part 14 of 25

    Test Ansible Roles with Molecule: Real Pitfalls and Fixes

    Test Ansible roles end-to-end with Molecule on Rocky 10 + Ubuntu 24.04. Multi-OS scenarios, side-effect tests, real pitfalls, ansible-lint production pass.

    17 min read·Apr 2026

  15. 15 Manage Docker Containers with Ansible (Rocky 10 + Ubuntu 24.04) Part 15 of 25

    Manage Docker Containers with Ansible (Rocky 10 + Ubuntu 24.04)

    Managing Docker on a single host is a script. Managing it on five, twenty, or fifty hosts the same way is a Sunday you do not…

    17 min read·Mar 2026

  16. 16 Setup Event-Driven Ansible (EDA) for Real-Time Automation Part 16 of 25

    Setup Event-Driven Ansible (EDA) for Real-Time Automation

    Standard Ansible runs when you tell it to. Event-Driven Ansible (EDA) flips that model: it watches for events and fires playbooks automatically when conditions match. A…

    7 min read·Apr 2026

  17. 17 Ansible with Kubernetes: Deploy and Manage a Cluster Part 17 of 25

    Ansible with Kubernetes: Deploy and Manage a Cluster

    Ansible and Kubernetes meet at two points, and they pull in different directions. The first is provisioning: turning a pile of fresh Ubuntu machines into a…

    21 min read·Jun 2026

  18. 18 Terraform and Ansible: Provision Then Configure Part 18 of 25

    Terraform and Ansible: Provision Then Configure

    Most infrastructure teams eventually land on the same realization: Terraform is great at creating servers, but terrible at configuring them. Ansible is great at configuring servers,…

    11 min read·Apr 2026

  19. 19 Ansible + Proxmox: Automated VM Management Part 19 of 25

    Ansible + Proxmox: Automated VM Management

    Managing a handful of Proxmox VMs through the web UI is fine. Managing dozens across a cluster, spinning up test environments on demand, tearing them down…

    15 min read·Apr 2026

  20. 20 Add Grafana Data Sources with Ansible: Prometheus and InfluxDB Part 20 of 25

    Add Grafana Data Sources with Ansible: Prometheus and InfluxDB

    Clicking through the Grafana data source form once is fine. Doing it on a fresh Grafana every time you rebuild a monitoring host, or across ten…

    8 min read·Sep 2018

  21. 21 Automate Windows Server with Ansible: WinRM Setup and Management Part 21 of 25

    Automate Windows Server with Ansible: WinRM Setup and Management

    If you’ve only used Ansible on Linux, Windows is a different animal. There’s no SSH, no Bash, and the module names all change. Windows Server relies…

    13 min read·Apr 2026

  22. 22 Deploy WordPress on Rocky 10 with Ansible (LAMP/LEMP Role) Part 22 of 25

    Deploy WordPress on Rocky 10 with Ansible (LAMP/LEMP Role)

    Deploy WordPress on Rocky Linux 10 with one Ansible role that handles both LAMP and LEMP. SELinux fix, MariaDB idempotent setup, REST install probe.

    11 min read·Apr 2026

  23. 23 Harden Rocky Linux 10 with Ansible: CIS Level 1 Playbook Part 23 of 25

    Harden Rocky Linux 10 with Ansible: CIS Level 1 Playbook

    Ansible role that lifts Rocky 10 from 58 to 68 percent CIS Level 1 compliance: SSH, sysctl, firewalld, Fail2ban, auditd, PAM, banner. Measured with OpenSCAP.

    4 min read·Apr 2026

  24. 24 Ansible vs Chef vs Puppet vs Salt: Which Automation Tool to Choose Part 24 of 25

    Ansible vs Chef vs Puppet vs Salt: Which Automation Tool to Choose

    Four tools, four architectures, four communities pulling in different directions. If you’re choosing a configuration management tool right now, the landscape looks nothing like it did…

    2 min read·Apr 2026

  25. 25 Ansible Commands and Playbook Cheat Sheet Part 25 of 25

    Ansible Commands and Playbook Cheat Sheet

    Ansible commands blur together after a while. You know the module exists, you just can’t remember the exact flag or the right ansible-playbook option to dry-run…

    14 min read·Apr 2026

Press ESC to close