by kissgyorgy · 5y ago · 0 comments
I never understood these project where somebody makes a very easy declarative thing and makes it imperative.
Programming in Python is order of magnitude "harder" and error prone than writing a simple YAML file.
For a simple config, sure.
But as soon as you have something more complicated, you end up with:
- a frankenstein monster DSL, with pseudo flow control + funcs backed in through a patched up templating system
- weird error messages, no stack trace, and type errors that accumulates
- no DRY
- no tooling: type checks, linting, de bugger, logger. Forget about it.
Case in point: ansible playbooks.
So unless your config is going to stay under 20 lines, just use a real programming language. If you don't want to use Python, fine. Use dhall, nix, jsonet or something else.
Debugging is definitely something I also would like to see something better coming out of Ansible than what is currently available.