Curso de Ansible desde Cero — Full (Mega)
Duración sugerida: 6 semanas (autoestudio + práctica). Objetivo: aprender Ansible desde conceptos básicos hasta automatización avanzada en infraestructuras reales.
Semana 3 — Playbooks y roles básicos
- Playbooks:
- Estructura YAML, plays, tasks, handlers, become.
- Idempotencia y check mode:
- Uso de --check y --diff.
- Handlers y notificadores.
- Roles:
- Estructura estándar (tasks, handlers, templates, files, defaults, vars, meta).
- Ejercicios:
- Escribir playbook para instalar y configurar Nginx con role básico; usar templates Jinja2.
Content Breakdown (What’s Inside)
The course correctly follows the official Ansible learning path, which is its strongest asset.
-
The Absolute Zero (Hours 1-4): It starts properly—no assuming prior YAML or SSH knowledge. The instructor (voiceover, often Latin American Spanish) explains inventory files (INI vs YAML),
ansible.cfghierarchy, and the difference between ad-hoc commands and playbooks. This section is gold for beginners. -
Playbook Anatomy (Hours 5-9): Deep dives into tasks, plays, modules (
copy,file,apt,yum,service). The examples are practical: "Install and configure Nginx on 3 webservers." The "Full" part shows here—they cover error handling (ignore_errors,failed_when) early, which most beginner courses skip. -
The Middle Game: Variables & Jinja2 (Hours 10-13): This is where many students quit Ansible. The course handles it well but gets dense. Variable precedence (the 14 levels of hell) is explained with a wall-of-text slide. Tip: Watch this section twice. The Jinja2 templating for
index.html.j2is very well demonstrated with loops and conditionals. -
Advanced Core (Hours 14-18): Roles, Ansible Galaxy, Handlers, and Tags. The instructor builds a "role for a LAMP stack" from scratch. This is the most valuable part of the "Mega" course because it mimics real-world folder structures.
-
The "Mega" Extras: Includes Ansible Vault (encryption), basic AWX (the open-source upstream of Tower) introduction, and a surprising amount of Ansible Navigator and execution environments—topics from Ansible 5/6 that are rarely in free courses.
Módulo 3: Ad-Hoc Commands y Módulos Esenciales
- Ejecución de comandos rápidos (Ad-Hoc).
- Módulos más utilizados:
command,shell,copy,file,yum,apt,service,user. - Gestión de paquetes y servicios de forma remota.