5 ms·
One of Ansible's big selling points that it was "simple" because it used YAML. What a shitty idea that turned out to be. And it's not simple. It's just as co
by pmoriarty 6y ago
One of Ansible's big selling points that it was "simple" because it used YAML.
What a shitty idea that turned out to be.
And it's not simple. It's just as complicated as its competitors. It's full of weird quirks and corner cases, and just like all the other tools in its class it feels like it was more congealed and cobbled together out of random bits than designed in a consistent, elegant way.
- effie 6y agoInteresting. Which other system is simpler/better designed in your opinion?
- pmoriarty 6y agoNone! They're all atrocious hacks.
- dnr 6y agoThe most promising thing in this area, IMO, is NixOS and surrounding tools like NixOps. They're strange and hard to learn, and you have to do almost everything differently from what you learned, but it is really true declarative configuration of a machine from the ground up, not quasi-declarative where there's always state that gets left out and you can never really trust the diffing/idempotency mechanisms because they're layered on top of things that weren't meant to be used that way. (If you dig into the details, you will find some "atrocious hacks" as the sibling comment puts it, but because of how it works, the hacks are almost completely encapsulated at build time and those builds are reproducible, so there's much less to worry about when you're deploying/provisioning.)
- bryogenic 6y agoAnyone who thinks that any tool will make systems administration and automation "simple" has drank the kool-aide of some sales pitch. Systems administration and automation is complex. That being said I've found Ansible to be the most useful tool for the job. It does the things I need it to and new modules are usually easy to incorporate into my work if I need specific tasks done. It has its shortcomings but it hasn't blown up into an unmaintainable mess like many of the other solutions I've poured hundreds of hours into. YAML is not fun, but it's been good enough for the task of pushing parameters around.
- dnautics 6y agoIt's not that it's YAML so much as it's yaml-trying-to-be-a-PL. At that point why not go the hashicorp route an just use a programming language DSL?
- geerlingguy 6y agoIf you don't try throwing tons of logic in the YAML (and build a module or plugin where needed to keep that logic out of the YAML), then your playbooks are 99% of the time simple YAML lists and dicts. The hardest thing for some people seems to be whitespace issues, but that can be resolved easily enough by integrating a linter into your environment, or minimally showing whitespace characters in your editor.
- dnautics 6y ago> then your playbooks are 99% of the time simple YAML lists and dicts. But really, that's not the problem. The problem is when you inherit someone else's playbook that is itself trying to do a hackjob around a community playbook.
- geerlingguy 6y agoWhen you inherit any code, it's always a mess, at least that's my experience. Sometimes a working mess, but it's rare to inherit nice code in any system. I could be biased since I've worked mostly with Python, Ruby, PHP, and Java.
- dnautics 6y agoof course, but debugging ansible YAML is exceptionally hard on account of the difficulty of decoding its quasi-declarative, quasi-imperative nature, the difficulty of knowing what the variables to be interpolated are (they could have been changed by other playbooks!), etc. You'll want at the very least a sane set of debug tools to figure things out when they go wrong. The other alternative is to just give up and rewrite the ansible script, which has been what I had to do on several occasions.