Ansible 101 - Episode 2 - Ad-hoc tasks and Inventory

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 ธ.ค. 2024

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

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

    thanks Jeff, I landed my current job thanks to the things I've learned from you for the past 3 years

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

    Thanks for such a giving to the community, Jeff. Take care and see you next week.

  • @AryanGNU
    @AryanGNU 11 หลายเดือนก่อน

    Thank you so much Jeff, that outro touched my heart! You are such a great soul, may lord always keep you in good health and wealth.

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

    I don't have the money right now but I truly will support you mate once im able to we need more people like you.
    Thanks for this wonderful content.

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

    Watching through these courses for the first time right now, it's absolutely eerie hearing the references to world events. It's really fascinating to look back and see, week-by-week, how sentiment and actions were changing, and how daily life was being affected. I'm sure it'll be even crazier to look back on some years from today, as well.
    Anyways, thanks for this series! Learning a whole ton, and while a lot of it still goes over my head, I'm picking up a lot of tips and insight into how sysadmin type roles function in the real world, or at least how the tools used are implemented.

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

    Hey Jeff. I just wanted to thank you for all of your hard work and high quality content. I just found your channel a couple days ago and you have become such an inspiration. I'm really looking forward to watching all your tutorials and hopefully being able to start to contribute more to the open source community myself. Thanks again!

  • @declanmcardle
    @declanmcardle 3 ปีที่แล้ว

    @58:00 to avoid -i and --limit if you just want to select 1 hostname you can just use the hostname before the -m or -a I believe...

  • @life-on-earth
    @life-on-earth 4 ปีที่แล้ว +2

    Thank you. I really like your work. I found you because of Ansible solr setup, and I don't know much about ansible. So, was going through the weeds of things and stumbled upon you. haha. This is great. :D

  • @acdii
    @acdii 3 ปีที่แล้ว

    Running through these, and using an old HP DL380 G6 server with 24G ram, 24 CPU and 3 TB HD with RHEL8 as the base OS, and doing it all via SSH. Built all 3 servers in half the time of the MAC, and best part, the server was free, and I only added 6 600GB HD@ $40 each. Awesome lab server!

  • @sarathraj4090
    @sarathraj4090 2 ปีที่แล้ว

    really nice to watch with the book.

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

    Great idea Jeff. During this "stay at home" period, good time for a refresher!!. "Dallas Texas"

  • @geoptus
    @geoptus 3 ปีที่แล้ว

    Hey Jeff, thanks for putting this series together - really appreciate how much you're giving out to the open community.
    I'm currently retraining for a new career in the computer networking industry (ccna to begin with) and automation is rapidly becoming
    a hot requirement, so this series is perfect.
    Ansible is very cool 😃
    Very happy to have purchased the ebook (physical purchase to follow) and be following along to this.
    Keep up the great work.
    Many thanks again!

  • @nyanRETARD
    @nyanRETARD 4 ปีที่แล้ว

    Oh my got... I watched just until you ran that first hostname command and I got the error. Then I had to debug it and continued watching. Now 30 seconds later you tell me about the error :D and I am just like "yeah :D" great video! love it

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

    Thanks a bunch for doing these videos, Jeff. I'm a total noob at this but I can see it's REALLY going to be beneficial for me.
    I hope you and yours have made it through relatively unscathed, and continue to do so. Take care.

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

    Thank you for this video series. I used to tell my interns and soldiers to start with the following basic computer troubleshooting technique:
    1. Is it plugged in?
    2. Is it turned on?
    3. Does it know who it is? (dns)
    4. Does it know what time it is? (ntp)

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

      Haha, so true. Similarly, a haiku:
      It's not DNS
      There's no way it's DNS
      It was DNS

  • @evanlane1690
    @evanlane1690 2 ปีที่แล้ว

    Very cool of Device42!

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

    I'll be waiting until I can buy it again. :) You deserve the money, sir. :)

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

    One question from chat, from Erik Hilbert: "Can you use Vagrant to deploy Windows boxes to test with?" - yes, app.vagrantup.com/boxes/search?utf8=✓&sort=downloads&provider=&q=windows should show some options. However, licensing is weird, and you might be best building your own Windows boxes for use with Vagrant.

  • @williambell8169
    @williambell8169 3 ปีที่แล้ว

    Ordered both your ansible books.. great job on these videos.. Hope you are doing well

  • @mohibnkhan
    @mohibnkhan 4 ปีที่แล้ว

    I liked your work and I purchased the book. Keep up the good work!!!

  • @kyzo_124
    @kyzo_124 4 หลายเดือนก่อน +1

    I am also from the south of The Netherlands and I didn't expect that your family also would be. Do you know what area? Maybe we used to be neighbors at some point😂. But anyway I am maybe a bit late for this but thanks for these tutorials. I am slowly building a bigger home lab and I wanted an easier way to manage all my servers. So these tutorials help me out a lot. Thanks for that!

  • @testlan7765
    @testlan7765 4 ปีที่แล้ว

    Great job Jeff, I think the best cut could be the videos and cut into the details more in the book, and then docs online. very helpful. thanks.

  • @TAICHI1SCO
    @TAICHI1SCO 4 ปีที่แล้ว

    Thanks Jeff, can't wait for the Episode 3.

  • @seddikalaouiismaili
    @seddikalaouiismaili 4 ปีที่แล้ว

    nice tuto
    i have bought your book 'ansible for devops' and it's very helpfull
    thx

  • @domemvs
    @domemvs 3 ปีที่แล้ว

    Awesome content. Thank you very much

  • @KarenJimenez-ne3hl
    @KarenJimenez-ne3hl 4 ปีที่แล้ว +1

    Great video you should use for testing environment LXC is very lightweight. Greetings from Madrid

  • @christiaansteenkamp5617
    @christiaansteenkamp5617 4 ปีที่แล้ว

    Thanks Jeff you are awesome!

  • @Badg0r
    @Badg0r 7 หลายเดือนก่อน +1

    Oh wow! I didn't know your roots are from the Netherlands. I'm a Dutchman too, and I've been following you for a long time! Let's meet up if you're in for a coffee with a fellow geek.

    • @JeffGeerling
      @JeffGeerling  7 หลายเดือนก่อน +1

      Hup Holland Hup!

    • @Badg0r
      @Badg0r 7 หลายเดือนก่อน

      @@JeffGeerling Laat de leeuw niet in zijn hempje staan!
      Don't let the lion stand in his shirt!

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

    great content! thank you for doing this.

  • @ilyesk7807
    @ilyesk7807 4 ปีที่แล้ว

    Very instructive keep going

  • @228oscar
    @228oscar 4 ปีที่แล้ว

    Hi Jeff, I'm just getting caught up on the Ansible 101 streams. You might want check out NDI options in OBS. If you have another machine available, NDI would allow you to export as a source to the other machine and offload the OBS and TH-cam backend things to the alternate machine and save CPU on your Mac for the things you want to do.

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

      Thanks for the suggestion! For now, I took a different approach and just upgraded my Mac to a core i9 processor with a dedicated GPU, and that seems to have done the trick :)

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

    Hi. Sorry to have to ask, but i'm new to ansible & vagrant. I followed the explanations to the letter, but the ssh connection is refused (see 29:50). "Disconnect from xxxxx: too many authentication failures". Does anyone have any idea how to troubleshoot this?
    *edit* Not sure what i did. I used "vagrant destroy", then relaunched the VMs. Had same issue as before. Then tried connecting directly by using the server IP instead of hostname. It worked for the db, but not the 2 other servers. I kept trying, using the group name this time and it suddenly worked. No idea why or how.

    • @JeffGeerling
      @JeffGeerling  4 ปีที่แล้ว

      I've run into this before; if you have multiple ssh keys added to your ssh-agent, this happens; see details in github.com/geerlingguy/drupal-vm/issues/70#issuecomment-92527785

  • @Xalor69
    @Xalor69 3 ปีที่แล้ว

    One way around the processor/RAM bottleneck you get using a laptop to stream AND to do ansible, is to put the ansible and vagrant parts on a different machine, acting as an 'Ansible Controller' and ssh from the laptop to the controller. SSH has a far lower impact than the ansible. Also, WSL2 and vagrant (on virtual box) is a no-go at this moment in time. If you enable virtualization in Windows, Virtual Box will no longer run (same for VMWare). So the only way is to have a Pro or Enterprise license and use vagrant + hyper-v (if that would work). However, MS did something that more than makes up for this. The OpenSSH suite is now available in a powershell or cmd console. WSL2 is irrelevant with the ability to SSH to a full Linux box.

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

    thanks Jeff

  • @RoyOlsen
    @RoyOlsen 4 ปีที่แล้ว

    I can't speak for the other video cards Apple may offer, but I have not been able to get OBS to do GPU accellerated encoding on my 15" MacBooks with AMD Radeon Pro Vega 20 or Radeon Pro 555X respectively. Well, not without booting into Windows, anyway.

  • @martinhering5705
    @martinhering5705 3 ปีที่แล้ว

    Hi Jeff, thanks for your amazing content. Just started using ansible a couple of days ago. Are you still using the setup with vagrant and virtual box? Did you reference your home ip in your viedo as you created the servers ? Or in my case, what ip do i have to reference in that file when i want to test your scenario. Take care and greetings from Germany

  • @JeffGeerling
    @JeffGeerling  4 ปีที่แล้ว

    Another question, from Darko Gavrilovic: "Can you post your Ansible recipes you used for elasticsearch?" - yes! I have a role on galaxy.ansible.com for elasticsearch, and the book's official GitHub repository has an example of an ELK stack with Elasticsearch, Logstash, Filebeat, and Kibana: github.com/geerlingguy/ansible-for-devops/tree/master/elk

  • @julienbietlot3401
    @julienbietlot3401 4 ปีที่แล้ว

    Hello Jeff, I was learning about Ansible and fell on your TH-cam channel. Great Content, wonderful opportunity and thank-you for sharing your book. I was mandated to check if Ansible could be used to handle a fleet of computer (not servers but embedded computer used in transportation). One point I am missing is a working inventory system. I know we can do it trough ansible, we have build custom solution in the past but having a standard solution with a UI tool displaying characteristics (software version, configuration, etc) is a must. What can you recommend on the topic?

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

      @Julien Bietlot - Glad you asked! The episode's sponsor, Device42, has one solution-their software works to automatically inventory all your servers, whether bare metal, cloud, clustered, etc., and then you can use that inventory with Ansible using one of their custom dynamic inventory scripts.
      Ansible itself doesn't have a focused UI for displaying servers and inventory-instead you'd typically look for a good solution for that (inventory catalogs), and then integrate that with Ansible to run things on top of all your servers and services.

  • @sahdevchauhan
    @sahdevchauhan 3 ปีที่แล้ว

    Was following running a ad-hoc command example in background with below command but the prompt never came back until update got completed. Not sure how it supposed to work. I was hoping you can run other commands while background process completes.
    Command I tried - ansible -i inventory app -b -B 3600 -a "yum -y update"

  • @chandra5953
    @chandra5953 3 ปีที่แล้ว

    Thankyou so much for the nice content. How would we do this with aws Ec2 instances..

  • @abhinav32100
    @abhinav32100 4 ปีที่แล้ว

    At 17:45,
    VirtualBox 6.1
    Vagrant 2.2.10
    RHEL 7.8
    If any of the linux [not MAC-OS folks] guys folks error like:
    VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory VBoxManage:
    Run sudo modprobe vboxnetadp
    After this if you face error
    Stderr: VBoxManage: error: Failed to open/create the internal network 'HostInterfaceNetworking-vboxnet0' (VERR_SUPDRV_COMPONENT_NOT_FOUND).
    VBoxManage: error: Failed to attach the network LUN (VERR_SUPDRV_COMPONENT_NOT_FOUND).
    VBoxManage: error: One of the kernel modules was not successfully loaded. Make sure that VirtualBox is correctly installed, and if you are using EFI Secure Boot that the modules are signed if necessary in the right way for your host system. Then try to recompile and reload the kernel modules by executing 'akmods && systemctl restart vboxdrv.service' as root (VERR_SUPDRV_COMPONENT_NOT_FOUND)
    VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ConsoleWrap, interface IConsole
    Run: sudo modprobe vboxnetflt
    Then Run vagrant up.

  • @bbennett2hz
    @bbennett2hz 3 ปีที่แล้ว

    I just picked up the book as I wanted to go further into the examples you mentioned. I'm stuck on the part where pip module is suppose to check for the django state of present. It appears that its defaulting to pip for python 2.7 where as django requires 3.6
    ansible app -b -m pip -a "name=django

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

      Can you check in the GitHub issues for the book? I think someone else had a similar finding and maybe also posted the answer already.

  • @AmedeeVanGasse
    @AmedeeVanGasse 4 ปีที่แล้ว

    0:30 late to the stream, but hello from Belgium.

  • @georgelza
    @georgelza 3 ปีที่แล้ว

    I'm configuring mine with a bridge interface. how can I tell it to not ask me which physical on host to associate the bridge with, I always pick #1, and then can I echo the servers IP once configured, maybe ifconfig as a shell command as part of a sensible playbook.

  • @jamesdanielelliott
    @jamesdanielelliott 4 ปีที่แล้ว

    Regarding FTP on Windows, to me the hands down best option is WinSCP. Though dev on Linux is much easier generally.

  • @mathewkargarzadeh3158
    @mathewkargarzadeh3158 3 ปีที่แล้ว

    Thanks Jeff for your Ansible tutorial. just a heads up, the texts on your screen are so small, I barely can see anything. Thanks again. Mat.

  • @danielnsumba8455
    @danielnsumba8455 3 ปีที่แล้ว

    Hey Jeff thank you so much for this, I have just one issue in my set up, I am working on ubuntu 20.04 terminal as i follow but i cant see my virtual machines in virtualbox yet on the command line it seems to be working, what could be the issue?

  • @l.tmckeithen3696
    @l.tmckeithen3696 2 ปีที่แล้ว

    Hi from SC

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

    Hi Jeff, I am getting "Too many authentication failures error", when I run
    ansible multi -i inventory -a "hostname"
    Can you help?

    • @fahadkhanchughtai3279
      @fahadkhanchughtai3279 4 ปีที่แล้ว

      Hey, I finally cracked that ansible was trying many ssh keys and after 5 tries it was turned down by the network. I used the following line to ask ansible to specifically use the given ssh key, and it worked.
      ansible_ssh_common_args="-o IdentitiesOnly=yes"

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

    Hi from France

  • @simplyviki
    @simplyviki 4 ปีที่แล้ว

    Nice content, but I missed the free book as I am watching it today :) Good luck to the Ansible series

    • @JeffGeerling
      @JeffGeerling  4 ปีที่แล้ว

      They're still free for another week or so, thanks to Device 42's generous sponsorship for the month of April!

    • @simplyviki
      @simplyviki 4 ปีที่แล้ว

      @@JeffGeerling Thanks for the prompt response, I got the ebook and hopefully I'll be able to leverage the content in my Ansible learning. You are doing a great job..!!

  • @tomcullen7861
    @tomcullen7861 3 ปีที่แล้ว

    Merry Christmas Santa Clara California USA

  • @tdubb123
    @tdubb123 4 ปีที่แล้ว

    Hi there. i am going through the video and got stuck on ansible multi -i inventory -a "hostname". For me it says cannot communicate with the Vms. From the machine you are running the commands from is it on the same isolated subnet as the VMs: 192.168.60.x?

  • @tony-ma
    @tony-ma 2 ปีที่แล้ว

    I run the following command however getting
    ansible -i inventory db --become -m package --args "name=ntp state=present"
    ansible -i inventory db --become -m service --args "name=ntpd state=started enabled=yes"
    However getting "Could not find the requested service ntpd: host" error
    I was able to run the following command to start the ntp service
    ansible -i inventory db -b -a "service ntp start"
    Not sure why the service module doesn't work for me

  • @tmchavez13
    @tmchavez13 3 ปีที่แล้ว

    This may be way down the road... I have built a QuadDramble using Pi4s and have Ansible working... but you seem to utilize the YUM command to do many things... this doesn't seem to work on the Debian OS I have installed on my Dramble... is there a way to install YUM or is it implied that we have to use a different OS on the Pi4s? (In other words, I can not figure out how to utilize the yum commands in the ansible playbooks (or on command line) and I can not find a way to install yum.) Thoughts, anyone?

  • @computerfreakch8912
    @computerfreakch8912 3 ปีที่แล้ว

    I wonder what those handful of folks who gave it thumbs down were thinking... Or maybe it's better not to ever know?

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

    Just putting this here, I got stuck at the command
    ansible multi -i inventory -a "hostname"
    It kept saying the authenticity of the host can't be established, then it asked if I wanted to continue connecting. If I said yes, it would just ask me again. I tracked this down to a github thread github.com/ansible/ansible/issues/25068 that seems to be following this exact setup.
    I found you can get around it by adding the following below the [multi:vars] group.
    ansible_ssh_common_args='-o StrictHostKeyChecking=no'
    Hope that helps.

  • @shawflygirl
    @shawflygirl 3 ปีที่แล้ว

    Hi Jeff, I'm wanting a digital copy of your book until i can get the paperback copy but the slider won't go below 9.99 despite having javascript running. Any thoughts please

    • @JeffGeerling
      @JeffGeerling  3 ปีที่แล้ว

      Please check on the Ansible Outreach page for a coupon link for the book for $4.99: github.com/ansible/community/wiki/Outreach%3A-Books-and-Materials

  • @jamallmahmoudi9481
    @jamallmahmoudi9481 4 ปีที่แล้ว

    Thanks very Nice....

  • @ashishkarnad4059
    @ashishkarnad4059 4 ปีที่แล้ว

    Hi Jeff I missed the deadline anyway I can still get the ansible for kubernetes

    • @JeffGeerling
      @JeffGeerling  4 ปีที่แล้ว

      Sure! Send me an email or tweet or whatever and I'll get you a link to a free copy.

  • @ES-nx2cd
    @ES-nx2cd 2 ปีที่แล้ว

    I'm having issues with vagrant files. I'm running Ubuntu on VMware on a MacBook Pro, and I keep on getting the error: "Vagrant failed to initialize at a very early stage”. I've installed and updated the plugins, but nothing is working. Any ideas?

    • @anonymousnyancat3231
      @anonymousnyancat3231 2 ปีที่แล้ว

      Are you trying to run Vagrant in a virtual machine?

    • @ES-nx2cd
      @ES-nx2cd 2 ปีที่แล้ว

      @@anonymousnyancat3231 Yes

  • @billmccaffrey1977
    @billmccaffrey1977 3 ปีที่แล้ว

    Two thinks different than the book version 2.0 August 5, 2020. You skipped over the ansible.cfg file page 23. Also page 23: line 20 of hosts.ini you have ansible_user instead of ansible_ssh_user.

  • @1979benmitchell
    @1979benmitchell 4 ปีที่แล้ว

    Little late to the Party.. But have you considered doing some lessons on Pluralsight or Udemy? There is a serious lack of detailed Ansible lessons on Pluralsight :)

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

      It's something I might be open to, but I hope to keep putting out great content that's free for anyone on TH-cam, as well!

  • @tejsinghranaofficial
    @tejsinghranaofficial 4 ปีที่แล้ว

    awesome!! :D

  • @dimitrioslykissas7981
    @dimitrioslykissas7981 4 ปีที่แล้ว

    For Windows file transfers, it's hard to beat WinSCP.

  • @ironnoriboi
    @ironnoriboi 4 ปีที่แล้ว

    Leuk shirt :)

  • @MajidChavoshi
    @MajidChavoshi 2 ปีที่แล้ว

    In the spirit of Open Source cooperation & calibration, can someone please tell me how I can use my laptop's webcam to capture my display Vs. my face? I'd like to teach a Linux and English class TH-cam.
    Many thanks in advance!

    • @JeffGeerling
      @JeffGeerling  2 ปีที่แล้ว

      I'm using free and open software called 'OBS' - it will let you set up a screen capture and also overlay a webcam on top of it like I do in this video.

    • @MajidChavoshi
      @MajidChavoshi 2 ปีที่แล้ว

      @@JeffGeerling I'll give it a try; thank you!

  • @mahmoudmansour9883
    @mahmoudmansour9883 4 ปีที่แล้ว

    Do you give us the book free for this month

  • @dhaneshkumar8391
    @dhaneshkumar8391 4 ปีที่แล้ว

    Hi, Im following Ansible for DevOps books. I have doubt in AWS boto3 Configuration in mac Could you pls help I tried to DM in Twitter...

  • @tdubb123
    @tdubb123 4 ปีที่แล้ว

    these are the errors I get
    192.168.60.4 | UNREACHABLE! => {
    "changed": false,
    "msg": "Failed to connect to the host via ssh: ssh: connect to host 192.168.60.4 port 22: Operation timed out",
    "unreachable": true
    }
    192.168.60.5 | UNREACHABLE! => {
    "changed": false,
    "msg": "Failed to connect to the host via ssh: ssh: connect to host 192.168.60.5 port 22: Operation timed out",
    "unreachable": true
    }
    192.168.60.6 | UNREACHABLE! => {
    "changed": false,
    "msg": "Failed to connect to the host via ssh: ssh: connect to host 192.168.60.6 port 22: Operation timed out",
    "unreachable": true
    }

    • @Lehi0001
      @Lehi0001 4 ปีที่แล้ว

      This is telling you that either port 22 is closed, or that there is a typo somewhere in the config for Vagrant (assuming you are using Vagrant.). Lemme know if you find the issue or need more help.

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

      @@Lehi0001 I dont know why I cant communicate via ssh from my mac host to the private network of the vagrant vms. So I changed everything to bridge instead and works

  • @BlackYgritte
    @BlackYgritte 4 ปีที่แล้ว

    guess i missed the stream by 2 hours..

    • @JeffGeerling
      @JeffGeerling  4 ปีที่แล้ว

      Aww, we'll do it again next week, same time, same place-see you then!

  • @sangeethahs5501
    @sangeethahs5501 4 หลายเดือนก่อน +1

    Poor video quality

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

      Looks fine to me - have you got a slow internet connection? (check if the TH-cam settings are set to High Quality)

  • @minecraftchest1
    @minecraftchest1 2 ปีที่แล้ว

    winscp supports ftp.

  • @googli8291
    @googli8291 2 ปีที่แล้ว