Ansible 101 - Episode 5 - Playbook handlers, environment vars, and variables

Поделиться
HTML-код
  • Опубликовано: 2 фев 2025

Комментарии • 54

  • @dennisask3960
    @dennisask3960 3 года назад +21

    "I am debugging my book in front of an audience".....

  • @dustinb7967
    @dustinb7967 4 месяца назад +2

    Jeff is a great teacher, I've learned so much from him. I really appreciate how real this video is, sometimes RUclips gets too cultivated and perfect. 👍

  • @ThomasRStevenson
    @ThomasRStevenson 4 года назад +25

    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!

    • @JeffGeerling
      @JeffGeerling  4 года назад +11

      Live streaming adds a bit of a fun factor-two of my Drupal live streams were in the middle of GitHub outages 🤪

    •  4 года назад +1

      Agree !!

  • @brianchamberlain2430
    @brianchamberlain2430 3 года назад +1

    Thanks!

  • @JoshWright10
    @JoshWright10 2 года назад +2

    Just seeing you add a quick "debug: " line during the include_vars troubleshooting was immensely valuable!

  • @arabiccola
    @arabiccola Месяц назад

    This episode really showed your mastery of the topic via your ability to quickly overcome issues. I thought it was quite inspiring and showed the depth of your understanding of the topic

  • @adamolsson1036
    @adamolsson1036 4 года назад +13

    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!

  • @leebobtheblob87
    @leebobtheblob87 Год назад

    5:28 singel vs double : regex
    7:06 yaml linting
    17:05 fail module to mimick failure. 17:36 Handlers dont run when task fails
    17:49 force handlers to despite the fail
    18:05 two reminders regards to handler
    19:55 notify a list of handlers to simultaneously restart
    32:34 continue from here

  • @mathewkargarzadeh3158
    @mathewkargarzadeh3158 3 года назад +2

    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.

  • @wdtj
    @wdtj 4 года назад +4

    Great tutorials and book. Keep them coming. Thanks for all your hard work.

  • @christophedc6486
    @christophedc6486 4 года назад +2

    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!

  • @nabutovsky
    @nabutovsky 2 месяца назад

    Thanks, Jeff. You winged it like a pro! =]

  • @lmartinezj
    @lmartinezj 4 года назад

    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

  • @JacekSzaega
    @JacekSzaega 3 года назад +4

    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.

    • @jnorment5670
      @jnorment5670 3 года назад

      I just hit this as well.

    • @yofuru
      @yofuru 2 года назад

      Good one Jacek!

  • @grahammccann8554
    @grahammccann8554 2 года назад

    Hi Jeff, Thank you for making these videoes.

  • @baardkristian
    @baardkristian 2 года назад

    Thank you so much for this series! That ending caught me off guard though! 🤣

  • @azizutkuozdemir
    @azizutkuozdemir 4 года назад

    it is really good idea that you do this live !!!!! subscribed

  • @anra54
    @anra54 4 года назад +2

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

  • @donporter8432
    @donporter8432 4 года назад

    Learned a lot on this one, Jeff. Don from Thailand.

  • @DavidtheSwarfer
    @DavidtheSwarfer 2 года назад

    Apparently I have been living under a rock while managing a few servers manually. Started using ansible on Tuesday and by Friday I had a playbook that takes a fresh install of freebsd and sets it up as a simple backup server (actually a replacement for an existing server, but 64 bit with ZFS root this time), still some niggles to sort but this will be much more useful for replacing the main server with apache , samba, exim, lots of users and custom subsystems to migrate.

  • @GreatAliyevs
    @GreatAliyevs 3 года назад

    Bro you are the best. Thk for video.

  • @rameshreddy954
    @rameshreddy954 3 года назад +3

    when can we expect ansible 201 series?

  • @pmirji02
    @pmirji02 4 года назад +1

    awesome tutoring....

  • @ThomasRStevenson
    @ThomasRStevenson 4 года назад

    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?

    • @JeffGeerling
      @JeffGeerling  4 года назад +2

      Yes, that is the case-item will be whatever was first found in that list.

  • @williamlopez1826
    @williamlopez1826 4 года назад

    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?

  • @adamstirk
    @adamstirk 4 года назад +1

    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?

    • @JeffGeerling
      @JeffGeerling  4 года назад +1

      Worry not! I hope in Episode 7 (if not then, Episode 8) to cover Molecule at least on an introductory level. I will be covering 3.0, but may not get around to _all_ aspects of Molecule in that episode.

  • @djmbah8190
    @djmbah8190 4 года назад +1

    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

    • @JeffGeerling
      @JeffGeerling  4 года назад

      If you want, you can leave an issue on the ansible-for-devops repository on GitHub; I would need some more detail, e.g. what you were trying to do, what command tripped you up, etc. The 'controller' is usually whatever machine you're working from (e.g. your personal workstation if you're working on some VMs running on it).

    • @djmbah8190
      @djmbah8190 4 года назад

      @@JeffGeerling Thank you very much sir. I am Grateful you replied. I was teaching to teach myself using your book. I follow all examples in chapter 1 and 2 successfully. I am really stocked with chapter 3 Ad-Hoc commands. I used the examples in the book to create 3vms using vagrant on windows pc. My problems now is how do I manage those newly created vms? Please don't be annoyed if my question seem stupid, I am lost and need clearances. Your work has been so helpful to me. Thanks

    • @JeffGeerling
      @JeffGeerling  4 года назад

      @@djmbah8190 Ah, that can be a bit difficult, when using Windows to connect to a VirtualBox VM via SSH with Ansible. See Appendix A which is on Windows and Ansible use. You might have some luck using the Windows Subsystem for Linux, but on the whole, it may be easier to work from a different environment (e.g. Linux or macOS), otherwise you will need to figure out how to work with SSH and get ansible running inside Windows either through WSL, Cygwin, or some other VM-style environment.

    • @djmbah8190
      @djmbah8190 4 года назад

      @@JeffGeerling Thank you very much sir. I really appreciate your help. God bless you.

    • @rujaaltrasportllc5055
      @rujaaltrasportllc5055 4 года назад +1

      I suggest you take vagrant tutorial, available for free on youtube. I don't have access to AWS or AZURE. Therefore, I'm using gns3 dockers and vagrant dockers

  • @llJoDall
    @llJoDall 4 года назад +2

    "You might be not familiar with spaces.." ok :D

  • @qwoeby
    @qwoeby 3 года назад

    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?

    • @qwoeby
      @qwoeby 3 года назад +1

      I think I found the solution: add to task Get the value of an environment variable the line "become: false". As this will then use the correct user with the edited bash profile.
      I looked at this while i got some errors which stated that I had no permission to /root/.bash_profile. For some reason I also got this error with vagrant user, but that somehow magically solved itself.

  • @HemenShowkati
    @HemenShowkati 4 года назад +1

    I didn't know you were real! Maybe a bot!
    Just kidding. Nice to find out about your channel. Keep going.

  • @azizutkuozdemir
    @azizutkuozdemir 4 года назад

    dont go too hard on yourself . referring to 46:24- on wards

  • @candyczar
    @candyczar 4 года назад +1

    Just finish talking and then put up an end screen, you can stop once you see it in the preview :)

    • @JeffGeerling
      @JeffGeerling  4 года назад +2

      Great idea! I went ahead and created an end scene that I started using in Episode 8 today.

  • @MohammadMahro
    @MohammadMahro 4 года назад

    Egypt

  • @jwbowen
    @jwbowen 4 года назад

    Almost had to stop watching with the Blues comments.

  • @metrotek5
    @metrotek5 2 года назад

    St. Louis Blues? ... I'll send you a Kings jersey so you can dress more accordingly.

  • @xaviertich
    @xaviertich 3 года назад

    Thanks!