Ansible Home Server Pt. 2 – Roles, Handlers, Ansible Galaxy, Filters & Loops

preview_player
Показать описание


Follow me:

Support the channel:

Music:
Kitrano – Slow Evening
Lolek – Cruise Control
Meod – Crispy Cone
Steven Beddall – Cuts So Deep (Instrumental Version)

Videos are edited with Davinci Resolve Studio. I use Affinity Photo for thumbnails and Ableton Live for audio editing.

Video gear:

Other stuff that I use:

As an Amazon Associate, I earn from qualifying purchases

Timestamps:
00:00 Introduction
00:24 Recap
00:44 Turning our tasks into a role
01:32 Role defaults
02:02 Creating a non-root user
02:28 Filters (password_hash and regex_replace)
04:19 Creating groups (loops and lists)
05:21 Suppressing login message (file module)
06:27 Restarting SSH on changes (handlers)
07:20 Complex loops
08:19 Ansible Galaxy introduction
08:52 The dangers of dependencies
09:31 Using a Galaxy role to install Docker
10:33 Running the playbook
11:03 Outro
Рекомендации по теме
Комментарии
Автор

I won't lie, I completely forgot I ever saw the first part

Felix-vehs
Автор

I first heard about ansible from you, then forgot about it for a long time. Recently I rewatched your ansible demo and these two videos, and Jeff's great series. Now everything in my home server, plus my desktop and laptop, is controlled strictly through ansible. I even no longer use the shell to do anything other than normal navigation, anything to install or remove or change system wide or local config wise, only has to go through ansible, which might be too strict, but gave me a great peace of mind!

I will always be grateful :)

aelhamamy
Автор

I am a huge fan of your content. This series has inspired me to build my own home server. I would love to see a continuation, especially one where you could automatically set up and run docker containers (perhaps with docker compose files?). I see that's all set up in your archived repo, but would love a walkthrough.

blazenetwork
Автор

Your content is great, Wolfgang. Thank you. Please keep it coming.

affinitystablepeanuts
Автор

Ansible is great for setting up your homelab, I picked up a few tips from this video, thanks!

FrankKumro
Автор

I never thought this video would actually get made. I stand corrected

Flackon
Автор

Watched part 1 and tried out Ansible just yesterday, perfect timing! The videos are great to get started and provide lots of helpful information!

izocker
Автор

i saw part 1 a while ago and i was excited to spend my weekend setting it up but as soon as i got home from work the github was cleared out )); excited to see this part 2!

dlorp.
Автор

One way to overcome the risks of using other people's roles is to fork them and keep them updated. This way you can also make PRs if you find bugs in a role (maybe encountered after an Ansible update) and this way both of you win.

cheebadigga
Автор

Things to try out in the weekend, thanks!

accik
Автор

Can't wait for more episodes of this series!

mopiranha
Автор

The sshd config stuff can be simplified by copying a file to /etc/ssh/sshd_config.d/
This makes it easier when an sshd update has changes in the default config.
Check if sshd_config contains "Include /etc/ssh/sshd_config/*.conf".
I have first seen this structure in Debian Bullseye

gzoechi
Автор

Took you long enough! Finally, thank you sir 🎉

Adrianvdh
Автор

A great video. Fast, sweet and to the point. One suggestion: each time before you clear the screen, count to two. This gives those of us who are typing as you go along an easier time pausing the full terminal screen video at the right time. You don't have a git repo with your examples? Perhaps with commits each time you complete a section of your tutorial. Thanks for the great intro!

robertharker
Автор

Thanks for the explanations. I actually started picking up Ansible using ChatGPT, which is great at giving you something to start with. Then, I continued by having the ansible linter installed in VSCode to give me advise. Eventially, I wanted to have some parts of my code become reusable and the style your video was perfect to give me a good overview on how to do it, rather than watching a 30-60 min course on Ansible just to learn how to write roles.

rGunti
Автор

Your thumbnail game is on point my dude

sarundayo
Автор

That inconsistency of being able to list packages you talk about around 5:00 really made me feel like I didn't understand ansible circa 2019. I did, it was just unpredictable

Acceleratedpayloads
Автор

For loops is best practice to not use “item” as the loop var name. Use loop_control to set a new name with loop_var.

kaspersergej
Автор

Awesome video. Would you consider making a video about how you got into devops as a job? I'd be interesting to hear your perspective.

maxarendorff
Автор

I see the toolbox 🧰 from „Bauhaus“ in your thumbnail 😂

phandrx