Skip to main content
README.md1.2 KB
View on GitHub

Example: 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 stacks
atmos list stacks

# Describe the hello-world component in dev
atmos describe component hello-world -s dev

# Run the playbook in dev
atmos ansible playbook hello-world -s dev

# Run the playbook in prod (different vars)
atmos ansible playbook hello-world -s prod

# Dry run to see the command without executing
atmos ansible playbook hello-world -s dev --dry-run

Key Files

FilePurpose
atmos.yamlAtmos 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

Related Documentation