# Ansible

Ansible lets you describe the state a machine should be in — packages installed, files in place, services running — and repeatedly converge real machines toward that state over SSH, with nothing installed on them beforehand. This is a hands-on guide to using it well: writing production playbooks, understanding what's happening underneath them, debugging what breaks, and building your own modules and collections when nothing built-in fits.

It's built to work two ways: read it start to finish as a course, or jump straight to the one page that answers what you need right now.

## Start Here, Based on Where You Are

| You are... | Start at |
| --- | --- |
| New to Ansible entirely | [Getting Started](<https://computecentral.in/ansible/getting-started/index.md>) |
| Comfortable with the basics, want the daily-driver skills | [Core Concepts](<https://computecentral.in/ansible/core-concepts/index.md>) |
| Writing playbooks already, want to level up | [Playbook Engineering](<https://computecentral.in/ansible/playbook-engineering/index.md>), [Modules](<https://computecentral.in/ansible/modules/index.md>) |
| Managing a large fleet, run times are slow | [Advanced Execution](<https://computecentral.in/ansible/advanced-execution/index.md>) |
| Setting up a real project from scratch | [Production Engineering](<https://computecentral.in/ansible/production-engineering/index.md>) |
| Extending Ansible — a custom module or collection | [Build Your Own](<https://computecentral.in/ansible/build-your-own/index.md>) |
| Evaluating or administering Red Hat AAP / AWX | [Enterprise Platform (AAP & AWX)](<https://computecentral.in/ansible/enterprise-platform/index.md>) |
| Something's broken right now | [Troubleshooting](<https://computecentral.in/ansible/troubleshooting/index.md>) |
| Prepping for an Ansible or DevOps interview | [Interview Preparation](<https://computecentral.in/ansible/interview-prep/index.md>) |
| Already know Ansible, need a fast lookup | [Quick Reference](<https://computecentral.in/ansible/quick-reference/index.md>) |

## The Learning Path

```
flowchart TD
    A[Getting Started] --> B[Core Concepts]
    B --> C[Variables & Data / Jinja2]
    C --> D[Modules / Playbook Engineering]
    D --> E[Roles / Collections]
    E --> F[Advanced Execution /\nProduction Engineering]
    F --> G[Build Your Own\nModules & Collections]
    G --> H[Interview Preparation]
```

## Learn by Building

Each project uses only what the previous ones already taught you. Skip ahead if you're already past a stage.

1. **Ping three servers** — [Your First Playbook](<https://computecentral.in/ansible/getting-started/06-your-first-playbook/index.md>)
2. **Install and start nginx idempotently** — [Idempotency](<https://computecentral.in/ansible/core-concepts/11-idempotency/index.md>), [Modules](<https://computecentral.in/ansible/core-concepts/04-modules/index.md>)
3. **Create users with individual SSH keys** — [Case Study: User and SSH Access](<https://computecentral.in/ansible/case-studies/04-user-and-ssh-access/index.md>)
4. **Deploy a templated config file** — [Templates for Config Generation](<https://computecentral.in/ansible/jinja2-and-templates/03-templates-for-config-generation/index.md>)
5. **Package it as a role** — [Role Structure](<https://computecentral.in/ansible/roles/01-role-structure/index.md>)
6. **Split dev/staging/production cleanly** — [Case Study: Multi-Environment Inventory](<https://computecentral.in/ansible/case-studies/02-multi-environment-inventory/index.md>)
7. **Roll out a change with a canary batch** — [Case Study: Rolling Nginx Deployment](<https://computecentral.in/ansible/case-studies/01-rolling-nginx-deployment/index.md>)
8. **Encrypt a secret with Vault** — [Secrets and Vault](<https://computecentral.in/ansible/production-engineering/03-secrets-and-vault/index.md>)
9. **Add CI linting and a `--check` gate** — [CI/CD and Linting](<https://computecentral.in/ansible/production-engineering/06-cicd-and-linting/index.md>)
10. **Write a custom module** — [Build a Custom Module](<https://computecentral.in/ansible/build-your-own/01-build-a-custom-module/index.md>)
11. **Package it into a collection** — [Build a Collection From Zero](<https://computecentral.in/ansible/build-your-own/03-build-a-collection-from-zero/index.md>)
12. **Tune a slow playbook at scale** — [Forks, Serial, Strategy, and Throttle](<https://computecentral.in/ansible/advanced-execution/01-forks-serial-strategy-throttle/index.md>), [Performance](<https://computecentral.in/ansible/production-engineering/05-performance/index.md>)
13. **Learn the guardrails from real outages** — [Automation Outages: 9 Real Incidents](<https://computecentral.in/ansible/case-studies/08-automation-outages-and-guardrails/index.md>)

## Interactive Tools

Work through your own numbers instead of reading rules:

- [Variable precedence checker](<https://computecentral.in/ansible/variables-and-data/02-variable-precedence/index.md#check-any-combination>) — tick every place a variable is set and see which value wins, and why
- [Serial batch planner](<https://computecentral.in/ansible/advanced-execution/01-forks-serial-strategy-throttle/index.md#stopping-a-bad-rollout>) — batch sizes, ansible-core's rounding, and which failures stop a rollout
- [curl to uri converter](<https://computecentral.in/ansible/modules/04-uri-and-api-automation/index.md#curl-to-uri>) — paste a curl command and get an `ansible.builtin.uri` task, with secrets moved to variables

## Every Section

- [Getting Started](<https://computecentral.in/ansible/getting-started/index.md>) — history and origins, installation, SSH, your first connection and playbook
- [Core Concepts](<https://computecentral.in/ansible/core-concepts/index.md>) — inventory, modules, variables, conditionals, loops, handlers, idempotency
- [YAML & Execution Model](<https://computecentral.in/ansible/yaml-and-execution-model/index.md>) — what actually happens between YAML and remote execution
- [Variables & Data](<https://computecentral.in/ansible/variables-and-data/index.md>) — every variable source, and the full precedence order
- [Jinja2 & Templates](<https://computecentral.in/ansible/jinja2-and-templates/index.md>) — expressions, filters, and real config generation
- [Modules](<https://computecentral.in/ansible/modules/index.md>) — command vs. shell, decision trees, module-by-category reference
- [Playbook Engineering](<https://computecentral.in/ansible/playbook-engineering/index.md>) — blocks, error handling, imports vs. includes, delegation
- [Advanced Execution](<https://computecentral.in/ansible/advanced-execution/index.md>) — forks, strategy, fact caching, dynamic inventory
- [Roles](<https://computecentral.in/ansible/roles/index.md>) — structure, interfaces, production design
- [Collections](<https://computecentral.in/ansible/collections/index.md>) — structure, installing, publishing
- [Build Your Own](<https://computecentral.in/ansible/build-your-own/index.md>) — writing a module, building a collection from zero
- [Production Engineering](<https://computecentral.in/ansible/production-engineering/index.md>) — project layout, `ansible.cfg`, security, performance, CI/CD, testing
- [Enterprise Platform (AAP & AWX)](<https://computecentral.in/ansible/enterprise-platform/index.md>) — ansible-core vs. ansible vs. AWX vs. AAP, Controller, Mesh, licensing, Event-Driven Ansible
- [Case Studies](<https://computecentral.in/ansible/case-studies/index.md>) — full worked deployments, including the failure paths
- [Troubleshooting](<https://computecentral.in/ansible/troubleshooting/index.md>) — a real debugging methodology, not just a symptom list
- [Interview Preparation](<https://computecentral.in/ansible/interview-prep/index.md>) — by subject and by level, tied back to the concepts
- [Quick Reference](<https://computecentral.in/ansible/quick-reference/index.md>) — cheat sheets, no prose

## Further Reading

- [Ansible Documentation](<https://docs.ansible.com/>)
- [Ansible Core on GitHub](<https://github.com/ansible/ansible>)
- [Ansible Galaxy](<https://galaxy.ansible.com/>)
