> 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.
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).