With automation it’s all about declarative vs imperative. With tools like Ansible, Terraform, and Kubernetes, etc you declare the desired end-state and let the tool take care of the how behind the scenes. With tools like Ansible and Terraform you have the concept of idempotency where if you run the same automation again it should only result in changes the first time (when implemented correctly…sometimes this isn’t always the case). Imperative processes can be brittle and prone to breakage if circumstances change or may contain bugs.
This is why using Ansible as a script wrapper is problematic. At some point legacy scripts written in Bash or some other scripting language should be ‘ansibleized’.