Getting started with Ansible 15 - Host Variables and Handlers

Поділитися
Вставка
  • Опубліковано 15 жов 2024
  • Ansible is an incredible configuration management and provisioning utility that enables you to automate all the things. In this series, you'll learn everything you need to know in order to use Ansible for your day-to-day administration duties. In video 15, we'll learn how we can benefit from host variables, and we'll also take a look at handlers as well which is a more efficient method of restarting services after a configuration change is made.
    Full series:
    Part 1 (Introduction): linux.video/an...
    Part 2 (SSH Overview & Setup): linux.video/an...
    Part 3 (Setting up the Git Repository): linux.video/an...
    Part 4 (Running Commands): linux.video/an...
    Part 5 (Running Elevated Commands): linux.video/an...
    Part 6 (Writing our First Playbook): linux.video/an...
    Part 7 (The 'when' Conditional): linux.video/an...
    Part 8 (Improving your Playbook): linux.video/an...
    Part 9 (Targeting Specific Nodes): linux.video/an...
    Part 10 (Tags): linux.video/an...
    Part 11 (Managing Files): linux.video/an...
    Part 12 (Managing Services): linux.video/an...
    Part 13 (Adding Users): linux.video/an...
    Part 14 (Roles): linux.video/an...
    Part 15 (Host Variables): This video
    Part 16 (Templates): linux.video/an...
    🙌 Support me on Patreon and get early access to new content!
    ➡️ learnlinux.lin...
    Wiki article for this video:
    www.learnlinux...
    🛒 Affiliate store for Linux compatible hardware/accessories (commission earned):
    ➡️ learnlinux.lin...
    💻 Check out the Tiny Pilot KVM for your Homelab (commission earned):
    ➡️ learnlinux.lin...
    🐦 Follow me on Twitter!
    ➡️ learnlinux.lin...
    💬 Official LearnLinux.tv Community:
    ➡️ community.lear...
    📖 Check out jay's latest book, Mastering Ubuntu Server 3rd Edition.
    Available in the USA late December 2020, and in other countries early January 2021
    ➡️ ubuntuserverbo...
    👨 More about me:
    ➡️ www.jaylacroix...
    ➡️ www.learnlinux...
    💽 How to create a bootable flash drive for installing Linux:
    ➡️ linux.video/fl...
    🐧 Which distro do I use?
    ➡️ learnlinux.lin...
    🔐 How to better secure OpenSSH:
    ➡️ linux.video/se...
    ☁️ How to create a cloud Linux server with Linode:
    ➡️ learnlinux.lin...
    #Ansible #LearnAnsible #AnsibleTutorial

КОМЕНТАРІ • 26

  • @MichaelWDietrich
    @MichaelWDietrich Рік тому +2

    you are blessed, we also have four seasons rainy and stormy, cold, rainy and hot

  • @bmilcs
    @bmilcs 3 роки тому +8

    You're a gifted teacher :). Seriously appreciate these videos.
    Note: Wiki page for Ansible 15 has "Template" functionality listed in it (should be in Anisble 16). I was a little confused because I thought it was directly related to host_vars, but the video itself clarifies it beautifully.
    Sorry for sounding nit-picky. I just thought it might help.

  • @krunalshah2484
    @krunalshah2484 4 роки тому +6

    You have made fantastic videos in this series. Exactly what I was looking for. Kudos to you for the knowledge you possess 👍👌

  • @mreid1166
    @mreid1166 3 роки тому +3

    Thank you for explaining the variables in Ansible - it has been a mystery to me how they apply in playbooks and how they are written out. I have a better understanding now. Love this whole series! Thank you!

  • @bongkem2723
    @bongkem2723 Рік тому

    good to have clean and structural playbook, nice vid

  • @MatiasOltrabella
    @MatiasOltrabella 4 роки тому +2

    Thanks a lot, your videos are awesome, great way for learning. i'm starting to create a raspberry pi kubernetes cluster, are you planning to create a "Getting started with kubernetes" video series? That would be awesome. Thanks again for sharing your knowledge. Cheers from Argentina

    • @LearnLinuxTV
      @LearnLinuxTV  4 роки тому +1

      I've been thinking about it, but I'm not sure yet. I'm torn between stand-alone videos and doing a series. I'm experimenting right now to see which one people generally like better. I've done some stand-alone Kubernetes videos (including how to set up a cluster on Raspberry Pi) so I'm still trying to gauge how to best set up that content.

  • @shivakarki6887
    @shivakarki6887 3 роки тому

    You have been very helpful, thank you sir.
    I wish to learn Jenkins from you too, someday.

  • @carlosalonsosouza6439
    @carlosalonsosouza6439 Рік тому

    Another great video. Merci Jay !

  • @tonymuhammadyousefnezhad9219
    @tonymuhammadyousefnezhad9219 3 роки тому +2

    Well, it is at least better than Canada. We only have two seasons - i.e., winter and winter is coming. BTW, thanks for the videos.

  • @name1355_0ne
    @name1355_0ne Рік тому

    Thanks a lot for the awesome tutorial.

  • @sma92878
    @sma92878 2 роки тому +1

    Where are you at in MI? I'm just outside of Ann Arbor.

  • @fabrice9848
    @fabrice9848 Рік тому +1

    We don't need to add the sudoer_simone file to roles/base/files/ since the bootstrap script already takes care of copying this file to the server.
    Am I wrong?

  • @exhebece5480
    @exhebece5480 2 роки тому

    files folder is still necessary, since the simone sudoers file which is used by Bootstrap isn't in a role.. unless I screwed up somewhere

  • @xichen2677
    @xichen2677 Рік тому

    Where can I find the Git repo of this course?

  • @hamidja1537
    @hamidja1537 Рік тому

    Thanks for sharing

  • @karimfernandes8346
    @karimfernandes8346 4 роки тому +2

    nice series!
    I didnt't understand what is the content of the .yml files in host_vars?
    thank you for your time investment in this, it is really helpful as i'm starting from zero.

    • @boxedowl
      @boxedowl 4 роки тому +1

      The content of the host_vars yaml files are variables to use in your playbooks. At a basic level it lets you rename a thing and refer to it as a different thing.
      The easiest way to understand this is to use it for something you want to change between computers or groups of machines.
      For example, in the host_vars YAML file I can make more than just a variable, I can make a whole list.
      So you can make one named whatever works for you such as packages or sys_packes as such:
      sys_packages: ['curl', 'ufw', 'iotop', 'iftop', 'python 3-pip']
      Then in the actual playbooks to install a whole list of software you can reference this such as:
      - name: Install packages
      apt: name={{ sys_packages }} state= latest
      By splitting things up like this you may create as many lists of software for as many machines as you would like. And always install them on every machine using the same Ansible play, but a different host_vars list per host or group.
      You can split all sorts of things this way, like users to create or software to install. It's really just a way of letting you use the same plays to create different outcomes by splitting your instruction specifics across more than one file.

    • @karimfernandes8346
      @karimfernandes8346 4 роки тому

      ​@@boxedowl It did got clearer in the next video, I understood what it was supposed to do, but not the lines itself we were using in this exercise. Thank you for your explanation, it did help me to have a better understanding.

  • @mihai6564
    @mihai6564 2 роки тому

    Thank you

  • @blink7777777
    @blink7777777 2 роки тому

    Good videos

  • @anishadjidj8126
    @anishadjidj8126 7 місяців тому

    I love your work
    If the video was from 2023 i would definetly say it's in AI voice 😂

  • @jgranahan
    @jgranahan 4 роки тому

    Cool