Ansible Workshop Examples
Inhaltsverzeichnis / Table of Contents
1. Deutsch
Dieser Bereich enthält lauffähige und bewusst kleine Beispielprojekte für den Ansible Workshop. Jedes Beispiel besitzt ein eigenes ansible.cfg, Inventory, Playbook und Dokumentation unter docs/de und docs/en.
- Lab Skeleton - Grundstruktur für ein Ansible-Lab
- Inventory Basics - YAML-Inventory, Gruppen und lokale Verbindung
- Ad-hoc Diagnostics - Diagnosebefehle als Playbook nachvollziehen
- First Playbook - erstes idempotentes Playbook mit Markerdatei
- Template and Handler - Template rendern und Handler auslösen
- Variables and Facts - Variablen und Facts sicher anzeigen
- Loops and Conditionals - Schleifen und Bedingungen anwenden
- Role Webserver Local - lokale Webserver-Rolle ohne Systemänderung
- Block Rescue Always - kontrollierte Fehlerbehandlung
- Tags Check Diff - Tags, Check Mode und Diff Mode
- Vault Dummy Flow - Secret-Flow ohne echte Secrets
- Includes and Imports - statische und dynamische Task-Wiederverwendung
- Serial Rollout - gestaffelte Ausführung mit
serial - Delegate Run Once - Delegation und
run_once - Assertions Preflight - Preflight-Prüfungen mit Assertions
- Collections Requirements - versionierte Collection-Abhängigkeiten
- Multi Environment Inventory - Inventories für dev, stage und prod
- Group and Host Vars - Gruppen- und Hostvariablen vergleichen
- Jinja Filters - Jinja2-Filter in Templates
- File Line Blockinfile - Datei-, Zeilen- und Blockmodule
- Package Service Baseline - Paket- und Service-Facts ohne Installation
- Users Authorized Keys Model - Benutzer- und SSH-Key-Modell als Dummy-Dateien
- Async Poll - asynchrone Tasks und Polling
- Wait For Local Path - Warten auf lokale Pfade
- Fact Cache JSON - Fact-Caching-Konfiguration im Lab
- Dynamic Inventory Script - kleines ausführbares Dynamic Inventory
- Ansible Lint CI Skeleton - CI-Skelett für Syntax und Linting
- Molecule Role Skeleton - Rollen-Teststruktur mit Molecule-Dateien
- AWX Job Template Model - AWX-/Controller-Jobmodell als Datenstruktur
- Execution Environment Definition - Execution-Environment-Dateien erklären
- Troubleshooting Unreachable Failed - Fehlerstatus unterscheiden
Hinweise:
- Code, Variablen, Dateinamen und Kommentare bleiben englisch.
- Die Beispiele verwenden
localhost, lokale Markerdateien unter/tmpoder Dokumentationsdaten. - Vor echten Zielsystemen immer Inventory, Pattern und
--limitprüfen. - Beispiele mit AWX, Molecule oder Execution Environments beschreiben Strukturen, ohne externe Plattformen aufzurufen.
2. English
This area contains runnable and intentionally small example projects for the Ansible workshop. Each example has its own ansible.cfg, inventory, playbook, and documentation under docs/de and docs/en.
- Lab Skeleton - starter structure for an Ansible lab
- Inventory Basics - YAML inventory, groups, and local connection
- Ad-hoc Diagnostics - reproduce diagnostic commands as a playbook
- First Playbook - first idempotent playbook with marker file
- Template and Handler - render a template and trigger a handler
- Variables and Facts - show variables and facts safely
- Loops and Conditionals - apply loops and conditionals
- Role Webserver Local - local webserver role without system changes
- Block Rescue Always - controlled error handling
- Tags Check Diff - tags, check mode, and diff mode
- Vault Dummy Flow - secret flow without real secrets
- Includes and Imports - static and dynamic task reuse
- Serial Rollout - staged execution with
serial - Delegate Run Once - delegation and
run_once - Assertions Preflight - preflight checks with assertions
- Collections Requirements - versioned collection dependencies
- Multi Environment Inventory - inventories for dev, stage, and prod
- Group and Host Vars - compare group and host variables
- Jinja Filters - Jinja2 filters in templates
- File Line Blockinfile - file, line, and block modules
- Package Service Baseline - package and service facts without installation
- Users Authorized Keys Model - user and SSH key model as dummy files
- Async Poll - asynchronous tasks and polling
- Wait For Local Path - waiting for local paths
- Fact Cache JSON - fact caching configuration in the lab
- Dynamic Inventory Script - small executable dynamic inventory
- Ansible Lint CI Skeleton - CI skeleton for syntax and linting
- Molecule Role Skeleton - role test structure with Molecule files
- AWX Job Template Model - AWX/Controller job model as data structure
- Execution Environment Definition - explain execution environment files
- Troubleshooting Unreachable Failed - distinguish failure states
Notes:
- Code, variables, file names, and comments stay in English.
- The examples use
localhost, local marker files under/tmp, or documentation data. - Always verify inventory, pattern, and
--limitbefore targeting real systems. - Examples involving AWX, Molecule, or execution environments describe structures without calling external platforms.