3 ms·
I once took a job that involved managing Ansible playbooks for an absolutely massive number of servers that would run them semi-regularly for things like bootst
by kimbernator 3y ago
I once took a job that involved managing Ansible playbooks for an absolutely massive number of servers that would run them semi-regularly for things like bootstrapping and patching. I had used Chef before for a similar task, and I loved it because it's just ruby and I could easily define any logic I wanted while using loops and proper variables.
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.
- linuxftw 3y agoAnsible has a great module/plugin system. It's trivial to handle complex tasks or computations in a custom module or action.
- awesomeMilou 3y agoSo 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.
- linuxftw 3y agoThe '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.
- Draiken 3y agoThat'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.
- awesomeMilou 3y agoI 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.
- dharmab 3y agoIt technically is. Long ago as a junior sysadmin I created turing complete nightmares in Jinja.
- dabber 3y agohttps://yamlscript.org/ https://yamlscript.org/ was posted here a while back: https://news.ycombinator.com/item?id=38726370 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.
- aarmenaa 3y agoChef vs Ansible was the first example that popped into my mind. I had a very love/hate relationship with Chef when I used it, but writing cookbooks was definitely one of the good parts.