> I think Jinja-in-YAML is very much an antipattern.

The thought of working with Ansible again is my nightmare due to this. Apparently they had an actual Python DSL you could use instead of YAML for a while, but discontinued it? So now loops and if-thens are these awful drawn-out messes of YAML that interpret jinja in completely unpredictable ways.

Do you mean the Ansible Runner interface? It is apparently still available. It was featured more prominently in early documentation (http://web.archive.org/web/20120314070643/http://ansible.git...). The discontinued OpsMop by the original author of Ansible (https://github.com/opsmop/opsmop) used a Python DSL.

I would also like to avoid writing Ansible playbooks when I need to manage servers again. Something I want to try out is Pyinfra (https://pyinfra.com/). It is like Ansible in that it is agentless and works over SSH, but with configuration in Python instead of YAML and Jinja. There is also itamae (Ruby, works over SSH or on the local machine, https://github.com/itamae-kitchen/itamae) and mitamae (mruby, local-only, https://github.com/itamae-kitchen/mitamae).