That may be.. but imagine if you were in a team environment, and others started playing and modifying your wonderful bash code. It's almost a recipe for disaster, unless everyone is as disciplined as you are. With the declarative approach of Ansible, at least most things will be "guaranteed" to work.
Nonsense. There is no declarative approach in Ansible that's "guaranteed" to work. If Ansible is declarative then so is this Bash script
mkdir -p /opt/app
rsync -a src /opt/app
If people start modifying my Ansible scripts without discipline then it's going to be a disaster too.
Code review is the key in both cases.
I still don't understand why we can't just use bash (or some better language) and reject merge requests that don't have things split up into units that are either pure or who's side effects are idempotent.
Exactly my thinking and what I teach in my book[0]. Things like setting up NGINX or systemd live in separate units and can be rerun (changing NGINX config means just rerunning NGINX part).