ansible-playbook-and-role-design
Ansible Playbook and Role Design
Purpose
Ansible manages the configuration of already-existing hosts — installed
packages, running services, config files, users — by describing desired
state as YAML tasks and applying them idempotently over SSH/WinRM with no
agent required on the target. This complements, rather than replaces,
provisioning tools: Terraform/CloudFormation create the VM, network, and
IAM role that a host needs to exist; Ansible then configures what runs on
that host once it's there. See
infrastructure-as-code-terraform
for the provisioning side of that split, and
aws-cloudformation-templates
for the AWS-native equivalent. The operational risk Ansible manages is
twofold: idempotency (running the same playbook twice should converge to
the same state, not double-apply changes) and blast radius (a playbook
targets an inventory, and a wrong inventory or missing --limit can apply
a change to every production host at once).