
Jeff Geerling (geerlingguy) dives deeper into Ansible playbooks, following material from chapter 5 in the bestselling Ansible book, Ansible for DevOps.
Buy Ansible for DevOps: https://www.ansiblefordevops.com
Sponsor Jeff on GitHub: https://github.com/sponsors/geerlingguy
Support Jeff on Patreon: https://www.patreon.com/geerlingguy
Contents:
00:00 – Intro
04:25 – Questions from last episode
07:58 – Raspberry Pi K8s cluster
10:00 – Simple Apache playbook
11:33 – Playbook handlers
23:45 – Environment variables
35:43 – Dynamic variable files for multi-OS
48:40 – Ansible facts and setup module
50:48 – Registered variables
54:56 – facter and ohai
56:25 – Preview of Ansible Vault
58:00 – Outtro
source
Thank you so much for this series! That ending caught me off guard though! 🤣
Thanks!
Thanks!
Thanks Jeff !! Episode 5 was fantastic. appreciate your time for sharing your knowledge. just bought your book "Ansible for DevOps" have lots of reading to do. Thanks again !!. Mat.
at the current version i'm using i do net get the registered value to work. It always outputs an empty field.
The ansible version is 2.10.9, with python 3.6.8.
It seems to be that saving the variable is not succesful. I've tried just using cat ~/.bash_profile which does give me the whole file as output as the debug message. I think that it therefore has something to do with the output of the source and echo line. As a non bash hero I couldn't find the solution to this, did any had the same problem and solved it?
"I am debugging my book in front of an audience"….. <3 awesome
Fantastic tutorial, and great book!
One point I'd like to add, when you show environment variables, it works "by accident"
By accident that happened at the beginning of that topic. You created ENV_VAR as root, then added "become: false" to create a variable for centos user. Then you are reading ENV_VAR variable, but this is the root ENV_VAR, not centos one. To correct that, "become: false" should also be added to the "Get the value of an environment variable" task.
when can we expect ansible 201 series?
Bro you are the best. Thk for video.
Found out about this channel searching for Pi Cluster… This ansible playslist is my way to go playslist when cooking or doing the dishes….. Greetings from Colombia
Hi Jeff,
your video's are an amazing help on getting started with Ansible! They should have more likes and views, will be buying your ebook soon for supporting your work!
FIrst thing: I love your ansible modules , books and this series. But everytime you say ubuntu I have this video in my mind: https://www.youtube.com/watch?v=yHF6RtjZyo8
Egypt
The distribution is part of ansible_lsb, for Ubuntu ansible_os_family is Debian 🙂
it is really good idea that you do this live !!!!! subscribed
dont go too hard on yourself . referring to 46:24– on wards
Great tutorials and book. Keep them coming. Thanks for all your hard work.
Debugging with GeerlingGuy is a series I would watch too. Twitch stream it and we can just hang for hours.
Sad! that I missed this live series. But, I'm catching up on youtube. Bought the book and started chipping in on github. keep doing what you're doing. You're an inspiration, and I'll add most of your projects to my learning schedule. Good luck. Just got couple itchy questions about ansible as it relates to gns3. Hopefully answers shall come as droplets.
Learned a lot on this one, Jeff. Don from Thailand.
New subscriber here!. Why am I missed out these live stream back in April 🙁
Thanks for the excellent live stream upload by the way, will definitely buy the book on LeanPub once I got the money saved, haha.
And lastly, congrats on the brand new laptop Jeff, totally awesome of device42 for sponsoring..
But can handlers perform a subtask? Say, build an rpm, immediately install the rpm, then go to the next rpm? Can handlers do that sort of immediate task instead of waiting until the end of the task?
Almost had to stop watching with the Blues comments.
Just finish talking and then put up an end screen, you can stop once you see it in the preview 🙂
awesome tutoring….
48:30 Lines 13 – 17: I understand your use of "include_vars" and "with_first_found", but I'm not sure why you added the string "{{ item }}" to line 14. Does "{{ item }}" expand to the name of the file that was first found from the list?
43:35 – I'm glad you don't "rehearse" the steps you are taking before starting the live stream. It gives us a chance to see real world problems, how you analyzed and resolved them. Also if you make "mistakes" I don't feel as bad when I make mine. Thank you for sharing these!
You can replicate this tutorial by using vagrant to launch 2 separate VM based on the centos7 box (geerlingguy/centos7) and the ubuntu box (geerlingguy/ubuntu1604). See https://stackoverflow.com/questions/23888381/how-to-run-several-boxes-with-vagrant .
"You might be not familiar with spaces.." ok 😀
I didn't know you were real! Maybe a bot!
Just kidding. Nice to find out about your channel. Keep going.
Loving the live Ansible live streams, bought the Ansible for Devops book a few months ago (happy to of paid for it, and I hope that the people who can afford it in this climate have thrown a few $ your way). A question around your Molecule content, will it be around v3? Lots of things have changed from v2 like the default verifier changing to Ansible, which I can’t get my head around and I haven’t found any tutorials using the Ansible verifier. From watching all your recordings of your live streams it seems that people are interested in learning Molecule, is this worth having either a dedicated episode or couple of dedicated videos/live streams to?
I really have issues with chapter 3, with the vagrant VMs what is my controller? Please help me. Where do I perform the command in your example
These videos are such an amazing complement to the book. First read it a couple of years ago, and this is a great refresher. Really excited for the kubernetes stuff on the raspberry cluster as well!