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

  Рет қаралды 37,144

Wolfgang's Channel

Wolfgang's Channel

Күн бұрын

Go to squarespace.com/wolfgang to get a free trial and 10% off your first purchase of a website or domain!
Follow me:
Mastodon tilde.zone/@notthebee
GitHub github.com/notthebee
Twitch twitch.com/notthebeee
Support the channel:
Patreon / wolfgangschannel
PayPal (one time donation) www.paypal.com/donate/?hosted...
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:
Camera geni.us/K8OOyKV (Amazon)
Main lens geni.us/jnnElY4 (Amazon)
Microphone geni.us/tgiSqL (Amazon)
Key light geni.us/Gi1zE2 (Amazon)
Softbox geni.us/F86pM (Amazon)
Secondary light geni.us/aciv (Amazon)
Other stuff that I use:
Monitor geni.us/KUzcmcP (Amazon)
Monitor arm geni.us/5RXu (Amazon)
Laptop stand geni.us/X5vx9Af (Amazon)
Keyboard www.amazon.de/HHKB-PD-KB401W-...
Mouse geni.us/KB7h (Amazon)
Audio interface geni.us/sdhWsC (Amazon)
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

Пікірлер: 63
@Felix-ve9hs
@Felix-ve9hs Жыл бұрын
I won't lie, I completely forgot I ever saw the first part
@atomictransfusion
@atomictransfusion Жыл бұрын
if it makes you feel better i haven't watched the part 1 because i didn't know that there was one
@blazenetwork242
@blazenetwork242 3 ай бұрын
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.
@JeffGeerling
@JeffGeerling Жыл бұрын
8:54 heh...
@andykrivovjas9256
@andykrivovjas9256 Жыл бұрын
Literally, I just finished watching your ansible series from a couple of years ago. Wanted to use ansible for my home infrastructure and maybe for work. Initially I used ChatGPT to setup my first playbook and get the basics, then found your videos. It helped a lot, I migrated all my home services from my proxmox machine to a tiny raspberry pi (I am from Ukraine and that's the only thing a can power when the electricity goes off). And now I am in love with ansible, wish I found it earlier. The only thing I didn't figure out is how to set the static ip and continue running the playbook; it always stops and I have to re-run other tasks for the new ip.
@Jimmy_Jones
@Jimmy_Jones Жыл бұрын
@@andykrivovjas9256 Damn. Why didn't I think of ChatGPT? I'm definitely finally going to get round to learning it this weekend.
@aelhamamy
@aelhamamy 4 ай бұрын
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 :)
@FrankKumro
@FrankKumro Жыл бұрын
Ansible is great for setting up your homelab, I picked up a few tips from this video, thanks!
@izocker2907
@izocker2907 Жыл бұрын
Watched part 1 and tried out Ansible just yesterday, perfect timing! The videos are great to get started and provide lots of helpful information!
@affinitystablepeanuts
@affinitystablepeanuts 29 күн бұрын
Your content is great, Wolfgang. Thank you. Please keep it coming.
@Flackon
@Flackon Жыл бұрын
I never thought this video would actually get made. I stand corrected
@dlorp.
@dlorp. Жыл бұрын
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!
@accik
@accik Жыл бұрын
Things to try out in the weekend, thanks!
@mopiranha
@mopiranha Жыл бұрын
Can't wait for more episodes of this series!
@Adrianvdh
@Adrianvdh Жыл бұрын
Took you long enough! Finally, thank you sir 🎉
@WolfgangsChannel
@WolfgangsChannel Жыл бұрын
Ansible Home Server playlist: kzfaq.info/sun/PLkxWXio1KmRoZd88WbrnSnQM5MJY5PjH2 Code: github.com/notthebee/ansible_homeserver
@frisosmit8920
@frisosmit8920 Жыл бұрын
Thanks for the link. The second video is not in the playlist though
@cheebadigga4092
@cheebadigga4092 Жыл бұрын
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.
@gzoechi
@gzoechi Жыл бұрын
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
@dexterman6361
@dexterman6361 10 ай бұрын
Thanks for the video!
@anothertijuano
@anothertijuano Жыл бұрын
Great video as always
@rGunti
@rGunti 9 ай бұрын
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.
@sarundayo
@sarundayo Жыл бұрын
Your thumbnail game is on point my dude
@robertharker
@robertharker Жыл бұрын
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!
@WolfgangsChannel
@WolfgangsChannel Жыл бұрын
I do: github.com/notthebee/ansible_homeserver
@nichtgestalt
@nichtgestalt Жыл бұрын
Nice! Thank you very much!
@a.g8517
@a.g8517 Жыл бұрын
great video
@kaspersergej
@kaspersergej Жыл бұрын
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.
@Acceleratedpayloads
@Acceleratedpayloads 5 ай бұрын
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
@edvardfranke
@edvardfranke Жыл бұрын
Thx😊
@maxarendorff6521
@maxarendorff6521 Жыл бұрын
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.
@phandr1x
@phandr1x Жыл бұрын
I see the toolbox 🧰 from „Bauhaus“ in your thumbnail 😂
@secretcactus4717
@secretcactus4717 Жыл бұрын
Nice!
@user-kv9dw4tp3y
@user-kv9dw4tp3y Жыл бұрын
Привет! Спасибо за продолжение) В последних видео видно было что исподьзуешь unraid для своего хранилища. Вроде бы раньше пользовался самодельным хрантлищем Ubuntu. Дак что в итоге удобнее в твоей ситуации?
@HugoParedes
@HugoParedes Жыл бұрын
Pleeeeaase show your nvim setup. It looks so good
@lostolli7766
@lostolli7766 Жыл бұрын
Your videos are great and I am about to build a small server on my own now. That's at least in part thanks to you. But there are a lot of options and personally I find it really hard to choose between all those safety feature. ECC RAM or not, powerloss protection or even a ups/usv? I am living in Germany (as you?) and power cuts are really rare in my region and many security options seem to be a huge overkill, but it's hard to judge in my opinion. I also want to build a somewhat power efficient server and used the list from hradeareluxx you showed in a video. So, if you see this comment, what are you doing to protect your data against a poweloss or similar?
@ambronhib5561
@ambronhib5561 Жыл бұрын
Thinking about building an homeserver for jellyfin, nextcloud (for me and my relatives) and a VM to run one or two gameservers to work on before launching them on a "real" server. I am trying to find a decent component list to fulfill all my needs without pulling too much Watt. Because the increase in the power-pricing at the moment is let me overthink building a homeserver in general already. What would you recommend?
@UntrackedEndorphins
@UntrackedEndorphins Жыл бұрын
You neovim setup looks rad af, are the dotfile available in your github?
@WolfgangsChannel
@WolfgangsChannel Жыл бұрын
thanks :) yep
@maxnatamo
@maxnatamo Жыл бұрын
Is there a reason you always rotate your head a little to the left?
@bb_poison
@bb_poison Жыл бұрын
ubuntu server and ansible? I'd figured you'd be up on nixos by now
@rc3043
@rc3043 Жыл бұрын
better use steam OS :D :D :D
@rajeshchaudhary883
@rajeshchaudhary883 Жыл бұрын
8:23 what is that dashboard?
@alphenit
@alphenit Жыл бұрын
Quick question: which user is ansible using to actually connect and "do" stuff on the homeserver? (Since the playbook has an entry to create the local notthebee user) how is ansible connecting to the homeserver if the local notthebee user does not exist yet ?
@VikramSoni2
@VikramSoni2 10 ай бұрын
what is this editor? can you make a video of your editor setup ?
@ktdefron
@ktdefron Жыл бұрын
Could you upload these to a repo somewhere to make them easier to review? Even cooler would be commits matching the timestamps but that'd be like course-levels of effort so totally just awesome bonus-points EDIT: Oh I see you did in a repo called infra. I was so busy looking for ansible in the name I missed it XD my bad
@WolfgangsChannel
@WolfgangsChannel Жыл бұрын
No you're right. infra is for my home infrastracture, not this tutorial github.com/notthebee/ansible_homeserver
@ktdefron
@ktdefron Жыл бұрын
@@WolfgangsChannel awesome thanks!
@nicolassery5397
@nicolassery5397 Жыл бұрын
Maybe start thinking about using full templates instead of lineinfile or blockinfile
@WolfgangsChannel
@WolfgangsChannel Жыл бұрын
Probably not a great idea for SSH. Each distro comes with a slightly different sshd_config, and in this case lineinfile is a better way to only enforce some SSHD options, but not all. That being said, I will go through templates in one of the next videos
@nicolassery5397
@nicolassery5397 Жыл бұрын
I wanded to tell you, I really appreciate your videos about homelab :)
@Xac501
@Xac501 Жыл бұрын
I thought you switched to Unraid
@gitgudchannel
@gitgudchannel Жыл бұрын
Looks like the Algo fkd your views up quite a bit, here's a small boost to get you back up to speed.
@WolfgangsChannel
@WolfgangsChannel Жыл бұрын
There's a reason why I almost abandoned this series 😁
@-blackcat-4749
@-blackcat-4749 6 ай бұрын
Latter manifestation is normal. 📚 It happened again
@Bill_the_Red_Lichtie
@Bill_the_Red_Lichtie Жыл бұрын
Really well done. It would be great if would delve into the structure of the files and directories and shared some insight about your decisions. Thanks! 👍 Here is link to part 1 --> kzfaq.info/get/bejne/kJ2gbJCemcnNnZs.html
@DrDingus
@DrDingus Жыл бұрын
Nice tutorial. Please slow down a little, it's not a race.
@IvanIvanov-qt6ik
@IvanIvanov-qt6ik Жыл бұрын
Personally, not really interested in tools tutorials, would appreciate more theory, news, thoughts and builds. P.S. I don't know why, but really interested in what apps do you use on your iPhone and why not Android... Best wishes.
@Jimmy_Jones
@Jimmy_Jones Жыл бұрын
Sounds like Level1Tech's channel would be good for you.
@cinnamon4183
@cinnamon4183 Жыл бұрын
sorry i havent watched even 30 seconds yet but bisexual lighting
@affinitystablepeanuts
@affinitystablepeanuts 29 күн бұрын
Now this one is also "1 year ago"! Time to do another one ;) this time with terraform/opentofu.
Busting 8 Common Homelab Power Efficiency Myths
19:14
Wolfgang's Channel
Рет қаралды 121 М.
Please be kind🙏
00:34
ISSEI / いっせい
Рет қаралды 190 МЛН
Каха ограбил банк
01:00
К-Media
Рет қаралды 11 МЛН
When You Get Ran Over By A Car...
00:15
Jojo Sim
Рет қаралды 11 МЛН
Alat Seru Penolong untuk Mimpi Indah Bayi!
00:31
Let's GLOW! Indonesian
Рет қаралды 13 МЛН
Meet netboot.xyz - Network Boot Any Operating System
25:00
Techno Tim
Рет қаралды 726 М.
Ansible Best Practices  Roles and Modules
1:04:24
Red Hat Ansible Automation
Рет қаралды 19 М.
Make Your Home Server Go FAST with SSD Caching
17:41
Wolfgang's Channel
Рет қаралды 128 М.
This web UI for Ansible is so damn useful!
20:07
Christian Lempa
Рет қаралды 458 М.
The Most Powerful DIY NAS I've built (ft. LattePanda SIGMA)
21:21
Wolfgang's Channel
Рет қаралды 181 М.
12 GREAT command line programs YOU recommended!
16:25
The Linux Experiment
Рет қаралды 232 М.
You did WHAT with Ansible?!
20:56
Jeff Geerling
Рет қаралды 138 М.
A Perfect Homelab Motherboard That You Can't Buy (ASRock IMB-X1231)
12:55
Wolfgang's Channel
Рет қаралды 168 М.
13.  Ansible Roles Explained in Detail
8:12
Vikas Jha
Рет қаралды 1,4 М.
Ультрабюджетная игровая мышь? 💀
1:00
Урна с айфонами!
0:30
По ту сторону Гугла
Рет қаралды 8 МЛН
Best mobile of all time💥🗿 [Troll Face]
0:24
Special SHNTY 2.0
Рет қаралды 1,9 МЛН