Ansible vs Terraform

Config vs IaC.

Overview

Ansible and Terraform are not really competing tools; they cover different concerns. Ansible is configuration management (provisions software inside existing machines via SSH); Terraform is infrastructure as code (creates and tears down the machines themselves via cloud APIs). Most teams need both; the "which one?" question is usually wrong, and the right question is "which tool for this concern?"

The approach

Workload-driven choice per concern, both tools where the workload spans both layers, documented rationale per tool. The discipline is recognising that the question is about layer rather than vendor preference.

Why this compounds

The right tool per concern compounds across years. Cross-tool tooling (CI integration, state management, secrets handling) gets built once per layer and reused. By year two the team's IaC and config-management muscle is mature and the layer-appropriate tool is automatic.