ADR-005 / Decision record
cloud-init does the minimum, Ansible owns configuration
Run-once tools get run-once jobs. Everything that can drift goes to something idempotent.
- Context
- Both cloud-init and Ansible can configure a guest. If both do, they fight over the same files.
- Decision
- cloud-init sets the hostname, creates the admin user with its key, and installs the guest agent. Nothing else. Ansible owns all OS configuration.
- Why
- cloud-init runs once and can't safely be re-applied. Ansible is idempotent, so drift is fixed by running it again.
- Trade-off
- A freshly booted guest isn't useful until Ansible has run against it.
Notes
The Ansible inventory is generated from OpenTofu outputs, so a new guest shows up in Ansible as soon as it exists, and a deleted one disappears. The two tools can never disagree about which hosts exist.