Ansible / Terraform are great when you're declarative, but once you start adding too much logic, things get hairy.