2 articles tagged with Configuration Management.
One is agentless and Python-based, the other two run a persistent agent and a domain-specific language. The architecture difference matters more than the syntax.
Terraform provisions infrastructure and Ansible configures machines, so pitting them against each other is the wrong question to ask.