Ansible For Network Engineers: Getting Started In Less Than 30 Minutes!

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ก.ค. 2024
  • In this video, we'll show you how to get started with Ansible for network engineers in less than 30 minutes! Ansible is a versatile tool that can be used to manage networks and systems, and this tutorial will walk you through the basics of using Ansible.
    If you're looking for a quick way to learn how to use Ansible for network engineers, then this video is for you! We'll show you how to get started with Ansible in just a few minutes, and by the end you'll be able to manage networks and systems with Ansible easily!
    👊Thanks for taking time to watch my video. If you could, pressing LIKE and SUBSCRIBING helps with TH-cam's algorithm so that more people can discover my videos. Feel free to leave a comment for any other topics you would like to see me cover or what your general opinion is of the video.
    🕘Timestamps🕘
    📕00:00 - Introduction
    📕00:35 - Basics of Ansible
    📕03:53 - Installing Ansible
    📕08:40 - Ansible CFG file
    📕11:08 - Ansible Inventory
    📕14:35 - Ansible PING test
    📕16:55 - Ansible Playbook
    📕21:45 - Creating custom Playbook
    Support the Channel:
    ⭐Become a Patreon: / thenetworkberg
    ⭐Become a TH-cam Member: / @thenetworkberg
    Social Media:
    🌏 / thenetworkberg
    🌏 / bergnetwork
    🌏 / the-network-berg-39451...
    MTCRE Playlist:
    • Free MTCRE RoSv6
    MTCNA Playlist:
    • Free MTCNA RoSv6
    Thanks again for watching

ความคิดเห็น • 43

  • @TheNetworkBerg
    @TheNetworkBerg  ปีที่แล้ว +6

    Pinned comment with some reference material:
    (Hahaha I also noticed that instead of saying Indentation I kept saying Indenture, must be recording stress and making content at 3AM in the morning or maybe writing playbooks feels like servitude hahaha! But you get what I mean. Make sure your spaces are where they need to be :P)
    Ansible Docs:
    docs.ansible.com/ansible/latest/
    Ansible for network engineers:
    docs.ansible.com/ansible/latest/network/getting_started/index.html

    • @Egg-se1qn
      @Egg-se1qn ปีที่แล้ว +1

      will forgive you this time :p

  • @mielushe2lheureux939
    @mielushe2lheureux939 ปีที่แล้ว +8

    Thank you so much. We need more tutorials like this.

    • @jairunet
      @jairunet ปีที่แล้ว

      Seriously...

  • @1einszweidrei
    @1einszweidrei 2 หลายเดือนก่อน

    I discovered your channel a bit late but i am enjoying your content a lot and this is very useful for my job. Thanks.

  • @Egg-se1qn
    @Egg-se1qn ปีที่แล้ว

    I've always been curious about Ansible! Thanks for the rundown.

  • @kareemschultz
    @kareemschultz ปีที่แล้ว +1

    great video and great T-shirt

  • @m-electronics5977
    @m-electronics5977 7 หลายเดือนก่อน

    How long you needed to understand ansible basics the first time. It wouldn't go in my head

  • @johnsmith-xu9pt
    @johnsmith-xu9pt ปีที่แล้ว +1

    excellent intro - thank you

  • @antoniomax3163
    @antoniomax3163 ปีที่แล้ว +1

    I like u videos. Ty

  • @maigonis.elleris
    @maigonis.elleris ปีที่แล้ว

    This can be deployed on even small SBC (like rpi, radxa, opi kind) or as docker on tik itself.

  • @oliver1121
    @oliver1121 ปีที่แล้ว +1

    Awesome shirt and great content!

    • @TheNetworkBerg
      @TheNetworkBerg  ปีที่แล้ว +1

      Thanks dude, I knew you would like the shirt if you saw it! Itachi is a real brother, will never forget how his character made me feel when he put his fingers on Sasuke's forehead. I still need to watch Boruto! Think I am just scared to see an older Naruto :C

  • @antoniomax3163
    @antoniomax3163 ปีที่แล้ว

    Can u add video about shadowsoks/vtray/Trojan ... In container on microtik?
    Its possible?

  • @artpietahcreative9356
    @artpietahcreative9356 ปีที่แล้ว

    Hey, Is it possible to configure two mikrotik routers such that one acts as the radius server of hotspot users in the other router without using usermanager?? Kindly help

  • @RogerPerkin
    @RogerPerkin ปีที่แล้ว +1

    Nice video - another easy way to install Ansible is by using pip - >> python3 -m pip install --user ansible

    • @TheNetworkBerg
      @TheNetworkBerg  ปีที่แล้ว +1

      Hey Roger, thanks for the comment. I actually initially learned how to use ansible by watching your videos! So if I continue with making more automation content you will definitely be getting a shoutout because I really feel like your work deserves more appreciation and attention. Thank you very much for all the content you also put out for free!
      This was the video I first watched sometime in 2020
      th-cam.com/video/5pa43fqFQAY/w-d-xo.html

  • @manfredklassen2060
    @manfredklassen2060 4 หลายเดือนก่อน

    Is there a way to set hosts parameters that can ssh into a mikrotik that is NATed behind another device ex: public port 8222 private port on mikrotik is 22

  • @m-electronics5977
    @m-electronics5977 7 หลายเดือนก่อน

    Every time when I watch videos like this I think I must start with ansible also. But when you don't have enough time it's not very nice to do it😢

  • @vinvvinv7460
    @vinvvinv7460 ปีที่แล้ว +1

    Hi, can you please make a video & explain the writing/structure of Ansible playbook & Terraform .tf in a simple manner & in layman's terms, like when & where to add spaces, hyphens, what is variable, etc it's a bit confusing...I am not from a programming background and hence find it difficult to understand. please it's a request, do reply

    • @TheNetworkBerg
      @TheNetworkBerg  ปีที่แล้ว

      I've never really used Terraform before, but if I do I will definitely make a video on it. Thank you for the suggestion.

  • @EricNiconovich
    @EricNiconovich ปีที่แล้ว +3

    You don't need sudo when you make or edit files your user has permission to. Additionally, the server keys vyos was using in your video were not RSA keys, they are ed25519.

    • @TheNetworkBerg
      @TheNetworkBerg  ปีที่แล้ว +1

      Thanks for the info, I more or less just read that Paramiko was complaining about RSA keys so it just made sense to me that I had not yet ssh'd onto those devices to get their keys, whatever they may have been ^^

    • @jairunet
      @jairunet ปีที่แล้ว

      @@TheNetworkBerg What about having 100 switches in the network, would you ssh manually to each 100 or 1000 of them? wouldn't be better to add ANSIBLE_HOST_KEY_CHECKING=False to the ansible configuration file?

    • @TheNetworkBerg
      @TheNetworkBerg  ปีที่แล้ว +1

      @@jairunet I do mention that in the video that you can change that in your ansible.cfg file so that you do not have to ssh into each router (I also think it is best practice to check SSH keys for people who are security focused) but sure if you are just going to be doing it for labbing then hasing out the hostkeychecking seems to be something many peopel do.

  • @SiBex_ovh
    @SiBex_ovh ปีที่แล้ว

    *) In past I use TheDude > unit > RMB and run script with parameters from unit like IP Public & IP internal and generate scripts and send that to unit and run...
    *) Now, I use massive sending script.auto.rsc via ftp - when ros receive .auto.rsc via ftp then this script is self-running ! and on the end of file, if all operation are good, then I remove it and .log . Next massive ftp do 'ls' to verify if remote file are removed, if not then I have one report file with not done scripting units to check what happend.
    *) Please do next video about Ansible who will send .rsc file > /import file.rsc with self-remove as last action > report units who not finish job, when script is still on the units. This give alternative for my setup.

    • @SiBex_ovh
      @SiBex_ovh ปีที่แล้ว +1

      I manage ~300 MikroTik units... example scripts who are universal and ready to send are:
      backup_scripts.auto.rsc - create task to do backup every 1w and send to email/ftp and do export who is send to git (for monitor changes in config)
      dude_ftp.auto.rsc - setup user for dude only, for ftp only - each with long password...
      EMailTest.auto.rsc
      security-access.auto.rsc - he detect all interface with "wan" in name and do for them fw-accesslist and fw-rules to allow access unit from know PublicIP , it remove admin user, add my own users , etc.
      wifi-uap-unifi.auto.rsc - for UniFi AP - do few Bridge&Vlans&Dhcp&FW for SSID who are in branches
      wifi.auto.rsc - the same like up but it detect if unit is old with only one wlan (2G) or if it detect 2 wifi chips.. then it configure the same SSID on both.. this is universal, better then capsman ofr me.
      And many more, Scripting and massive distribution is a key to manage many units. This is easy when Client say, we must change a password policy NOW... this is new password for wifi... then I can reconfigre it faster then 20% of employers read new mail with new password !
      Please, do again new video with MikroTik and Ansible.

    • @Darkk6969
      @Darkk6969 ปีที่แล้ว +1

      I have few MikroTik devices in my home lab and would love to automate them.

  • @richardallsopp5462
    @richardallsopp5462 ปีที่แล้ว

    For anyone that cares you can run Ansible on Windows via WSL.

    • @TheNetworkBerg
      @TheNetworkBerg  ปีที่แล้ว

      Never tried it, although I did want to run Docker once and used WSL which caused havoc with my VMWare Workstation Pro which forced me to uninstall WSL and I had to reinstall 3 of my MikroTik VMs. So I am really careful when it comes to WSL now.

    • @SiBex_ovh
      @SiBex_ovh ปีที่แล้ว

      @@TheNetworkBerg WSL destroy all other virtualization on the same host. This means WSL, big OR , other wirtualizations on the host.

    • @TheNetworkBerg
      @TheNetworkBerg  ปีที่แล้ว

      @@SiBex_ovh yup, I found that out the hard way lol :P

  • @Jomster777
    @Jomster777 2 หลายเดือนก่อน

    Bro, has anyone ever told you you like like the IT version of Joshua Weissman?

    • @TheNetworkBerg
      @TheNetworkBerg  2 หลายเดือนก่อน

      No, though I have had come to that conclusion myself. Perhaps we share an ancestor somewhere

  • @jairunet
    @jairunet ปีที่แล้ว +1

    I am sorry, I am not sure what the purpose of this video is... This whole video is an oops in my sincere opinion. Some candid suggestions, treat your videos as close as a real-world scenario, e.g. Ubuntu 20.04 LTS or 22.04 LTS, and prepare to explain that it is recommended to install Ansible via pip3 as it is a python based tool and it is not good practice to install the versions other than the ones from pip3, also have at least the plugins for nano or vim that will help with the indentation of the YAML files, last but not least, use at least a production like a version of the network OS, a rolling version of VyOS is a terrible choice. Best of luck.

    • @TheNetworkBerg
      @TheNetworkBerg  ปีที่แล้ว +4

      Thank you for your input, this video is an just introduction to quickly get started with Ansible as a network engineer. I also mention in the video that you can use PIP :) If the other methods are not acceptable then it should probably be removed from the Ansible documentation which I have open during the video explaining the installation process and what the video is based off. I would also recommend using a code editor like VS Studio Code to edit YAML files which I also say in the video.
      As for using Vyos rolling build, it doesn't matter it is at the end of the day just another node to manage, it could have been a Cisco, a Juniper, a MikroTik (Which I have a video on as well) or a mix of all of them. The point was just to showcase the use of modules and how to manage a node.

  • @ThomasSmoke
    @ThomasSmoke ปีที่แล้ว +1

    yaml is another abomination with a white space based structure which is easy only for programmers building parsers for it.

    • @spoonikle
      @spoonikle ปีที่แล้ว +2

      Sure but simple web tools can fix your YAML, its no longer 2004.

  • @Caliber632
    @Caliber632 ปีที่แล้ว +1

    p.s. it was developed by Michael de Haan and acquired by RedHat. They do that a lot with great software ;-)

    • @TheNetworkBerg
      @TheNetworkBerg  ปีที่แล้ว

      Ahhh thanks I didn't know that, as you said it happens a lot when it comes to ideas where a big corporate will just show a big bag a money and for an individual it would almost be stupid to decline. Look at something like minecraft where the dev sold it for billions of dollars. Sometimes I think he regrets it, not because of the cash, but because he was happier making the game.