EXAMPLE
Ansible
Minimal Atmos setup demonstrating how stack variables are passed to Ansible playbooks.
Try it out
- Install Atmos
- Try the example
Copy the example into a new directory and make it your own:
atmos init examples/demo-ansible
cd demo-ansible
Follow the README for prerequisites and next steps.
See it in action
RECORDED DEMO Real commands. Real output.
README.md1.5 KB
View on GitHubExample: Ansible Hello World
Minimal Atmos setup demonstrating how stack variables are passed to Ansible playbooks.
Learn more in the Ansible Playbook Command docs.
What You'll See
- Ansible component configuration in Atmos stacks
- Variables passed from stack manifests to playbooks via
--extra-vars - Catalog pattern for shared defaults with per-environment overrides
Try It
cd examples/demo-ansible# List all stacksatmos list stacks# Describe the hello-world component in devatmos describe component hello-world -s dev# Run the playbook in devatmos ansible playbook hello-world -s dev# Run the playbook in prod (different vars)atmos ansible playbook hello-world -s prod
Key Files
| File | Purpose |
|---|---|
atmos.yaml | Atmos configuration with Ansible component path |
stacks/deploy/ | Per-environment stack files (dev, prod) |
stacks/catalog/ | Shared component defaults |
components/ansible/hello-world/ | Ansible playbook and inventory |