3 ms·
> ditch the dsl and expose a pure python declarative api, with imperative escape hatches and a set of best practices + conventions encouraged by templates anf l
by Octabrain 4y ago
> ditch the dsl and expose a pure python declarative api, with imperative escape hatches and a set of best practices + conventions encouraged by templates anf linters.
Fully wholeheartedly agree but, as I stated in previous ocasions in this site, after the nightmares I've seen people, in many different places, doing with a high level tool like Ansible (and also Terraform), I apply heuristics about the probable outcome of every DevOps using a proper Turing-complete language as a general trend and I just want to leave CS and buy a hut in the middle of nowhere.
Perhaps something like that must come after a shift in the mentality of the whole business where people in CS in general, assumes one needs to be a good coder, no matter if you do DevOps of software and therefore, learn about software design patterns, reusability and best coding practices.
- Spivak 4y agoThe issue is that Ansible right now today is just Python but if you tied chopsticks to your fingers when typing. It’s not declarative, it’s sequentially evaluated with all the flow control and concurrency bugs to go with it. You have to already be a good coder to write Ansible but you have all your limbs tied behind your back because you get none of the features of Python to help you reign in complexity and validate correctness.
- zzzeek 4y agoThe killer feature of Ansible vs. Python code is, noting I have a ton of both here for infrastructure related tasks (as well as shell, why not), when you have it running for three years on some box somewhere and something breaks, you go look at it for the first time in three years and it makes sense. My Python infrastructure tools OTOH, while they are great, if something goes wrong with them I have to spend half a day reading the sourcecode and remembering what their particular architcture / conventions are. it's like the dumbness of Ansible is really the main feature it has.
- Spivak 4y agoI agree with you but I think that dumb + size => complicated which is where I live. When you have a playbook that is thousands of tasks long the dumbness leads to exactly the problem you have with Python.
- zzzeek 4y agoI agree with that! my ansibles are for really straight stuff deployed to a few boxes. Where I work, oddly enough at Red Hat :), the very large playbooks are definitely difficult to work with. It's hard to say though if a custom Python app of similar size is really any better though, unless your developers are Michelangelo.