Live data from Hacker News

Show HN: Ansible Crash Course

news.ycombinator.com

51–55 of 55 posts

Re: Show HN: Ansible Crash Course

#51
post #48
post #34

Earlier quoted context omitted.

I could write a provider to do so in a couple hours if one doesn't already exist. But frankly, if you're using those boxes you've already decided that your time is worth less than your money and spending time on automation is probably lower ROI than moving to something, anything, with an API. Anything that isn't IBM, anyway.

Cool, if your provider will have a tested way to install packages, copy/template files and setup services beyond docker. Basically Ansible/Saltstack/Puppet/Chef _are_ the API for plain UNIX. As for the great "time worth less than money"-argument - I host my own nextcloud (for me and my family) on such a VPS for ~USD9. I get some 100GB of storage, ample RAM and CPU; sure that's probably oversubscribed, but after setup…

> Basically Ansible/Saltstack/Puppet/Chef _are_ the API for plain UNIX.

I've never thought about it like that, but I think you're exactly right. That's a really useful way to think about it. To me, anyway.

Re: Show HN: Ansible Crash Course

#52

This won't be really helpful to you since you've already built it, but I'm the kind of person who doesn't like videos. I AM interested in Ansible, but I don't want to sit through videos about it; I want to read and follow the examples as I do. Actually, I wonder what the split is between people who prefer videos vs people who prefer reading?

I usually dislike videos. I have stumbled upon the "fun fun function" youtube videos by Mattias Petter Johansson and they are pretty great and helped me understand some stuff I had trouble wrapping my head around.

So 9 out of 10 times, I prefer text. But video can also be very powerful!

Re: Show HN: Ansible Crash Course

#53

I really wish there was a configuration management tool out there with a statically typed API. I've spent countless hours debugging Ansible's YAML which gets really unwieldy with hundreds or thousands of tasks.

A sibling comment already mentions Pulumi. There is also mgmt, which is a statically-typed, functional, and reactive configuration language. In mgmt the configuration is a function of the system's state. Configuration is automatically recomputed and reapplied when the relevant state changes. This is something I have on many occasions wanted in a configuration management tool. For an introduction to how it works you can read https://purpleidea.com/blog/2018/02/05/mgmt-configuration-la.... Mgmt is not yet production-ready.

I expect the trend of YAML configuration with templating hacks on top (which comes in at least two varieties: templates producing YAML as text like in Salt and templates inside YAML leaf nodes like in Ansible) to be seen as the early 2010s equivalent of growing an ad hoc programming language on top of XML. It tends to happen, since complex configuration needs to reuse values and contain expressions and it is easy to implement in a backwards-compatible way. The users will appreciate it if they had nothing before, but it locks them into a path of writing code (because it is code) with an ugly error-prone syntax, complex two-layered semantics, and little abstraction. I have got good mileage out of Ansible, but I would enjoy using it a lot more if the playbooks were written in a restricted subset of Python, for example.

You can do better without types, too. Writing Scheme, Lua, Tcl, etc. code as configuration even predates the XML craze. (Tcl and Lua code can be sandboxed and limited in the number interpreter instructions and wall-clock run time. Tcl in particular has extensive sandboxing capabilities built in with "safe interpreters".). The appearance of restricted configuration languages like Starlark (https://github.com/google/starlark-go), Jsonnet (https://jsonnet.org/), and Dhall (https://dhall-lang.org/) looks like a reaction to the trend of JSON/YAML templating, and it is a welcome reaction.

Re: Show HN: Ansible Crash Course

#54
post #26

This won't be really helpful to you since you've already built it, but I'm the kind of person who doesn't like videos. I AM interested in Ansible, but I don't want to sit through videos about it; I want to read and follow the examples as I do. Actually, I wonder what the split is between people who prefer videos vs people who prefer reading?

This is the first phase of the course. I go through a few phases and one of them is essentially writing small PDFs for each section and what they cover. That might interest you more.

Please use (simple) HTML instead of PDF. Everything is read on-screen these days. PDF basically has no use case that HTML doesn’t cover better in 2018.

Re: Show HN: Ansible Crash Course

#55

very few people understand the basics and you hit right on the point it is a state management with configuration as code and others can contribute to your work and approve the changes you are going to make rather than just you go make them, you can test the configurations on test machines before throwing into real world so you are adding extra set of eyes to prevent catastrophe.

Thanks! That's exactly it!

If we move into a future where everything is configured as code, I think that'll be of great benefit. Secondly, I think people will - by default - just become programmers. That can only be a good thing, I reckon.

Post reply on HN