Installing Ansible on Ubuntu - Windows WSL - Ansible Tutorial Video 2

preview_player
Показать описание
Installing Ansible on Ubuntu - Windows WSL

Please consider supporting my channel:
Order services:

Donate:

****Support My Channel****

I will greatly appreciate your support.

Video transcript:

Let's move on to the next part, and the next part is installing Ansible. To install Ansible, whether you're on a Mac, Windows, or Linux, the first option is you can install Ansible via pip. And of course, if you have Python installed on your machine, you can install Ansible via pip. Our second option is for anyone with Linux, even on Windows. That's what we're going to do. We're going to install Ansible via WSL, and I'm going to install it on Ubuntu. So, if you're on a Mac or Windows, and you can install a virtual environment and use that to install Ansible. There are lots of ways you can get a virtual environment on your system. You can use VirtualBox and install a virtual machine. You can use Vagrant, and I'll use Vagrant with Windows as my managed nodes. Of course, I would have loved to do this tutorial on Linux, but I prefer to use Camtasia to record my videos. I just wanted to address that in this video. Why, when I'm doing an initial server setup for a Linux system, I use Windows to record sometimes. That's because of Camtasia. I just prefer to record and edit with Camtasia.

Since I'm on Windows, I'm going to install Ubuntu on WSL. If you're on Windows, that's the same path you should take because Ansible doesn't run natively on Windows. If you're on Linux, any Linux distribution, it doesn't matter. You can install Ansible via the package manager, or you can install Python and then install Ansible. So, in this case, let's go to WSL. If your WSL is not enabled, just make sure you enable it. You can just do a Google search for how to enable WSL on Windows. It's not a big process nowadays if you're using the latest updated Windows. Then it's not a difficult process. In my case, WSL is already installed. I don't know if I've installed Ubuntu yet because I want to use Ubuntu. I'll just go to the Microsoft Store and I will search for Ubuntu.

Let's just do a search and see all the options. Here we have Ubuntu. Yeah, I will go with 20.04. Just click on it, click on "Get." So, I have WSL already turned on. Let it download, and then I'm just going to open it like a normal app, and you're going to see what you can do next. So, for you to enable WSL on Windows, make sure that virtualization is enabled in your BIOS. You can check for virtualization. I'm here on Windows 10.

If I go to the task manager...

If you go to the task manager and you look at "Performance"...

You look somewhere here; you'll see "Virtualization enabled." If this is not enabled, you need to go into your BIOS and then enable it. Just Google how to do it for your motherboard, for your specific computer. This needs to be enabled before you can work with WSL successfully. So, I'm just going to wait for this to finish downloading, and then we're going to continue. After this is the installation complete, it says "Open." Let me open and see if it is complete.

Enter a new Unix username. So, this is like installing Ubuntu. Just give it a username and then give it a password.

All right, so there we go. We have a new Ubuntu installation on our Windows. For good usability, let me just increase the font. Let's try 24. There we go; that should be much better. Ctrl+L to clear the screen, and then we can continue from here. So now we have Ubuntu. Let's just see if there are any updates. I'm going to do apt update.

Could not lock the file, so I need sudo.

-- so !! is like just rerun what was run last.

So, this is instead of retyping the command again; you can just do that, and it's going to replace it with the last command. While this is happening, let's come back here. Since I'm on Ubuntu, as I said, there are two ways in which you can install Ansible. The first way, you can use the package manager. You can just do sudo apt install, and you'll see that there's an Ansible that will be installed. But the reason why we do this is so that you can get the latest version of Ansible.

SOCIAL :
Рекомендации по теме
Комментарии
Автор

once installed on wsl. how can we use it ? will it create other wsl machines on the host (windows)? or will it be used just to test commands?

Ztall
Автор

Great news! You Can Now Hire Me on Fiverr For Linux Server and Web/Cloud support ( Ricky W on Fiverr)
Links to my Fiverr gigs:

BizanosaTutorials