Ansible Component Support
· 2 min read
Atmos now supports Ansible as a first-class component type, enabling unified orchestration of infrastructure provisioning (Terraform) and configuration management (Ansible) from the same stack manifests.
What Changed
Ansible joins Terraform, Helmfile, and Packer as a native component type in Atmos:
- New
atmos ansible playbookcommand executes Ansible playbooks with stack-based configuration - New
atmos ansible versioncommand displays Ansible version information - Full-stack processor support including inheritance, vars, env, settings, and auth sections
- Automatic variable file generation passed to Ansible via
--extra-vars @<varfile> - Native flag passthrough via
--separator for any Ansible option
Why This Matters
Infrastructure automation typically involves two layers: provisioning (creating resources) and configuration (setting up software). Teams often use Terraform for the first and Ansible for the second, but manage them with separate tooling and workflows.
With Ansible component support, you can:
- Manage both layers from one tool with consistent patterns
- Share variables between Terraform and Ansible components in the same stack
- Apply the same inheritance model to Ansible playbooks
- Use familiar Atmos workflows for configuration management
How to Use It
Configuration
Add Ansible configuration to atmos.yaml:
components:
ansible:
base_path: "components/ansible"
command: "ansible-playbook" # optional
Stack Manifest
Define Ansible components alongside Terraform:
components:
terraform:
vpc:
vars:
cidr_block: "10.0.0.0/16"
ansible:
webserver:
vars:
app_name: myapp
app_port: 8080
settings:
ansible:
playbook: site.yml
inventory: inventory/production
Commands
# Show Ansible version
atmos ansible version
# Run playbook with stack settings
atmos ansible playbook webserver --stack prod
# Override playbook and inventory
atmos ansible playbook webserver -s prod -p deploy.yml -i hosts.ini
# Pass native Ansible flags
atmos ansible playbook webserver -s prod -- --check --verbose
# Use aliases
atmos an pb webserver -s prod
