Re:Why the fuck are we templating YAML? (2019)
by jimkoen on Tuesday January 23, 2024 @12:25PM
(#39106444)
I agree. And to make matters worse, the DSL on YAML has grown so large in features, it may as well be a programming language now.
Re:Why the fuck are we templating YAML? (2019)
by dharmab on Tuesday January 23, 2024 @04:08PM
(#39109864)
It technically is. Long ago as a junior sysadmin I created turing complete nightmares in Jinja.
Re:Why the fuck are we templating YAML? (2019)
by dabber on Tuesday January 23, 2024 @05:05PM
(#39110605)
https://yamlscript.org/ was posted here a while back: https://news.ycombinator.com/item?id=38726370
I thought I remembered more comments on that thread, but I guess nothing more than what's there needs to be said.
Re:Why the fuck are we templating YAML? (2019)
by linuxftw on Tuesday January 23, 2024 @11:51AM
(#39105920)
Ansible has a great module/plugin system. It's trivial to handle complex tasks or computations in a custom module or action.
Re:Why the fuck are we templating YAML? (2019)
by jimkoen on Tuesday January 23, 2024 @12:25PM
(#39106434)
So why is there this massive ecosystem around not writing modules then? RedHat invented automation controller just so they didn't have to implement proper error handling with Ansible.
Re:Why the fuck are we templating YAML? (2019)
by linuxftw on Tuesday January 23, 2024 @04:49PM
(#39110405)
The 'not writing modules' approach is for people that aren't comfortable writing code. I think most capable users for non-trivial things should write custom modules a lot of the time.
Re:Why the fuck are we templating YAML? (2019)
by Draiken on Wednesday January 24, 2024 @05:45AM
(#39115836)
That's not how Ansible is meant to be used by default though. Modules are, in general, meant to be generic.
I bet you if I started writing modules for everything in most companies, people would complain. Unfortunately defaults matter.
I understand that Ansible was designed for non-programmers, but there is no worse hell for someone who is actually familiar with basic programming than being confined to the hyper-verbose nonsense that is Jinja templating of Ansible playbooks when you need to have a lot of conditional tasks and loops.