Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Ansible Crash Course
160 points by movedx 24 days ago | hide | past | web | favorite | 53 comments
Hi Everyone.

My name is Mike. I've created a free Ansible Crash Course. It's a course aimed at people who are new to Ansible and want to get up and running quickly. It goes into a fair amount of detail on most topics, but should something be missing just let me know and I'll add it in.

Any and all help would be greatly appreciated! Just note an email address is required to register for the course - this is a limitation of the platform I'm using to host the course. Sorry about that!

The course can be found over here: https://www.thecloud.coach/ansible-crash-course

Any and all feedback is greatly appreciated!

Thanks a bunch,


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?

If it's a video, I'm very likely to just hit the back button. I skim read far faster than a video is capable of giving me the information and I can't copy and edit example code from a video. I get that some people like videos, but unless there's a transcript, I'm not going to be using it. Now, if it's a general talk on a subject, a video is great as the speaker can entertain as the talk. But if it's tutorials, please write the article's to go with it.

I think you've hit on a good compromise: videos with a transcript (including code examples).

That way, people who want a video have a video (with the bonus of something to read-along to), and people who want text have text.

I hate videos for technical learning. I will avoid them as much as possible, especially if I cannot play at 2x speed (or more!) and/or if they don't have a thumbnail-preview when skipping.

Often I find that with videos:

- I already know some bits and pieces about something - it is quite rare to be coming in 100% fresh to something. So I don't want to have to sit through all the crap I already know, or have to skip backwards and forwards getting past the pre-amble ("What we're going to learn on this course!" "What is <subject>?" etc - if I didn't know what it was, I'd not be here doing the course) or bits I already know.

- Videos make terrible reference material. If you are trying stuff out as you learn you have to pause the video, then if you forget you then need to go back and re-watch the video to re-listen to what was said, perhaps several times. Text is so much easier to flip back and forth from.

- Watching videos often leads my mind to wander and before I know it I am "watching" a video and doing my email/programming/random internet stuff... this basically means I end up ignoring the video and just concentrate on my other real work.

Just as a thought experiment - can you imagine a stack overflow type site where all the questions and answers were in video format? That would be a special type of hell :-)

I couldn't watch this as it needed email registration, but some constructive suggestions:

- have a 100% textual content in nice chapters/sections.

- make the first example of something the absolute minimum-viable-example (don't make it "more interesting" with unnecessary extras).

- After presenting the example, go over it again in extreme detail (especially if new concepts are used) and explain each thing - e.g. What is this YAML thing? What is this param for? Why did we use value X? What does this other param do? What values can it take?

- make additional examples that cover the common other cases that someone might come up against, e.g. doing 1 of something vs doing X of something.

- copy-paste-able snippets for boring boilerplate (e.g. installation of stuff etc) are good++.

- Add a video as an extra demo that cements what was covered in the text. Try not to include any bullshit in the video (intros, jokes, other timewasting etc)

Absolutely no to videos. Can't easily tell what's where when I want to jump to a certain section, no result from web search for the contents and can't even copy paste any examples.

It's like keep watching TV for news to find the tiny bit that you might care about. Much waste of time.

For programming definitely text. We actually perceive code differently than blocks of texts, so it is easier to just jump to a block of code that seems right to what you want.

For videos, activities that are more visual, like guitar lessons are more suitable

> Actually, I wonder what the split is between people who prefer videos vs people who prefer reading?

I noticed this split with a few relatives. I can't stand having to slog through a video when I could just as easily read a transcript or a write-up. Therefore, YouTube is the last place I'll look for informative content.

My younger relatives actively seek out video tutorials and the like, and YouTube is the first place they look.

> My younger relatives actively seek out video tutorials and the like, and YouTube is the first place they look.

I would suspect that's because they've had more things read to them than they have acquired the skill/patience/vocabulary/instinct to seek out things to read for themselves.

I guess similarly, without the mental movie to play out the actions they're hearing the words for, it can be easier to watch someone type or watch a program run than to read about that same action

I detest videos and podcasts and wish HN always included warnings (e.g. “(podcast)”). At least a Vimeo or YouTube link is obvious.

For some content (like news!), I much prefer reading. For some books, especially informational (business, self-help, etc.), I prefer audio (Audible). For tech tutorials, I've come to appreciate quite a few video courses.

A video tutorial can be great, but it's more about the preparation and pace of the delivery. There are some really great and knowledgeable teachers of tech that I cannot stand to watch/hear. And then there are a number of excellent courses on Udemy (for example) that are 99% video content.

So for me, video _can_ be great.

I love videos, as long as the presenter is organised and speaks clearly

I know at this point this has been stated, but since this thread has effectively turned into a poll, here's my vote :)

I love videos if I'm starting out from scratch or if I'm trying to go an exhaustive course on something I've learnt on an ad-hoc basis.

However, if I know the tech or have done a course before, I can't bring myself to finish the video.

Regarding Ansible. I'm new so I'd probably take your course :)

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!

I truly prefer videos over text, I mean, in a perfect world, I want both, but for me, Videos are faster If I want to learn something from Zero. And for deeper understanding I go to the official documentation. But of course, that's my opinion, some time a fast tutorial will do it.

Yet another No Video Please vote here.

If I'm starting out from nothing, I prefer video content.

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.

Text is a must-have for me and videos can be a nice addition.

I prefer video as it shows. Text only leaves too much ambiguity to interpretation. Having taken multiple courses in coursera, edx and other online learning platforms, the video in this course is pretty well made.

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.

It's not yet 100% ready for prime-time, and certainly not for hundreds of thousands of tasks, but I wrote a ...hm... generic framework-wrapping framework (using Ansible as the first and only currently supported 'framework' -- but I'm working on a Terraform adapter, and plain shell-scripts. K8s is also planned), that supports optional typing of arguments. It also allows you to add other metadata to arguments (like documentation, references):


It can be used directly, using yaml. Or via Python (a bit like Pulumi, just more generic, and also a bit more flexible in other ways). Should be easy enough to also support other languages like JavaScript, although I think I'll write a client-library for a proper functional language first, because that'd be a really good fit, conceptually.

Still needs better (and up-to-date) documentation, and I realize I really have to work on my elevator pitch (as is probably quite obvious). But I'm already using it for most of my sysadmin/devops related tasks, and I'm growing more and more confident that the concept behind it is sound.

The ultimate goal is to allow users to build 100% composable devops pipelines, so that a complete app- (or whatever else-) infrastructure (including potential bootstrapping of physical machines as well as building container images, etc.) can be described with a single dict-like structure. That's probably a bigger piece of cake than I'll be able to bite off though :-)

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.

IMO Ansible is not a good tool for configuration management compared to tools like Puppet and Chef. There's no node graph which mininises how much you can do in parallel and proper chaining of dependencies, and using YAML to describe largely imperative tasks is downright horrible (looking at you with_items). I think it works fine for orchestration, but anything more and it gets uncomfortable.

Pulumi comes the closest that I’ve seen — https://www.pulumi.com/

This seems to work only with cloud providers, not with dedi boxes / VPSs?

"Cloud?" It can work with anything with an API. If there's a Terraform provider that they or the community hasn't projected into TypeScript (or whatever) you can do that yourself with minimal effort. Not sure what else you'd want.

How about plain old SSH? like all those low-end-boxes, you know ;).

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 I can leave it running for years without worrying to check my bandwidth/storage quota in addition to it being cheaper than any big cloud-provider. Initial setup works with cloudinit and managing the VMs itself has an API. And I suppose for everyone not running a customer-facing business, the ROI of such solutions is basically unparalleled ;).

Thanks for the lecture; I didn't spend three years teaching Chef at a Fortune 100, I promise.

You get that one can just write a thing to kick off instance-level CM if it doesn't exist, yeah? Like I don't know if it does for Pulumi because Pulumi doesn't seem to care much about trailing-edge systems--for now at least, it seems, they have a big enough market without having to stretch backwards--but it's not complicated; Terraform already has provisioners to do exactly that, so the pattern exists.

> 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.

Dunno, in my experience there is a long tail of use-cases where it is a more practical to work closer to system level (for different reasons: less complexity, political issues, legacy systems, etc.), so I don't think it's as black and white as you make it out to be. But I agree that there is a threshold after which 'everything API' is the way to go. Where that threshold is if often guesswork.

Overall, I don't think our tooling is quite there, and we haven't found the right abstractions yet. Terraform and Pulumi are nice enough, but to me it looks like they are only treating the symptoms, instead of looking at the issues on a more holistic level. I don't have any good solution for that, but I think we'll need to try to look at everything we're doing from different perspectives than the ones we are used to. That's hard (at least for me), and it's getting harder the deeper we dive into the current layers of complexity wrapped into more complexity.

Also, being able to weaken the distinction between configuration and code would be good. Often I need to make small change to code. But is a lot of work.

Looks really interesting. My jobs is talking about implementing Ansible, so I'll definately be taking this and providing feedback!

Thanks for the knowledge donation.

You're welcome, friend.

One suggestion: Once one video ends, it would be nice if we would be re-directed or if the following video would load automatically. Presently, I have to manually navigate from the current topic to the next and then activate the video to begin playing... This is of course very minor, but it would still be a nice update.

[edit: fix spelling fail]

This is very nice and effective. I just wish you had spent time in using the real world examples related to the server configs, instead of using the examples of hello-world, list of a, b, c, etc.

That's coming, for sure :-)

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.

What will me email address be used for?

Not op but it is mentioned in the Show HN blurb above:

> Just note an email address is required to register for the course - this is a limitation of the platform I'm using to host the course. Sorry about that!

That doesn't quite seem like an answer. Can I put in a fake address? If I put in a real address, will the platform decide to spam me?

Like, can I use https://temp-mail.org/en/ or will I need the email to access the material at a future date?

Yes you can.

Just put in ANY valid email. They don't even ask you to confirm it before starting the course. I generally use https://www.yopmail.com emails, works fine.

Crap. My habit of skimming strikes again

well constructed course! Comprehensive. Thanks for the effort, I bet you spent lots of time into it.

About a week of work :-)

I'm more inclined towards watching videos rather than reading books or articles. It's quick and introduces to various best practices. I started ansible with playbooks. I didn't know about the adhoc commands until now. Nice content! Keep going.

I agree, you have done a very good job keeping the videos short and focused. We use Ansible my job, and it's always been a bit of a dark art to me. Very much appreciate these videos.

Thank you :-)

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact