Ansible Lecture 11 | Ansible on Windows using WSL | Install & Configure Ansible

Опубликовано: 16 Май 2026
на канале: Code&Cloud
144
3

Automate with Ansible | Lecture 11
Ansible on Windows using WSL | Install & Configure Ansible

In this lecture, I demonstrate how to install and run Ansible on a Windows machine using WSL (Windows Subsystem for Linux). Since Ansible is Linux-based, WSL allows us to use Ansible on Windows without dual boot or virtual machines.

This lecture also covers configuring servers and verifying connectivity using Ansible.

What you will learn in this video

• What is WSL and why it is required for Ansible on Windows
• Installing WSL on Windows
• Installing a Linux distribution (Ubuntu)
• Installing Ansible inside WSL
• Configuring inventory and Ansible settings
• Connecting to localhost from Windows via Ansible
• Verifying setup using Ansible commands

Step-by-Step Commands Used in This Lecture
Enable WSL on Windows
wsl --install

(Check WSL version)
wsl --list --verbose

Update Linux Packages (inside WSL)
sudo apt update
sudo apt upgrade -y

Install Ansible on WSL (Ubuntu)
sudo apt install ansible-core -y


(Check Ansible version)
ansible --version

Inventory File Setup
(Default inventory)
/etc/ansible/hosts
(Edit inventory)
sudo vi /etc/ansible/hosts
Example:
[servers]
192.168.1.10
Test Connectivity
ansible all -m ping


Why Use WSL for Ansible on Windows

• No need for virtual machines
• Lightweight and fast
• Native Linux environment
• Ideal for DevOps & automation learning
• Works well with cloud servers



#Ansible #AnsibleOnWindows #AnsibleWSL #WSL #DevOps #Automation #Linux #InfrastructureAsCode #DevOpsLearning #CloudComputing

#Ansible
#AnsibleOnWindows
#AnsibleWSL
#WSL
#WindowsSubsystemForLinux
#DevOps
#DevOpsAutomation
#Automation
#Linux
#InfrastructureAsCode
#CloudComputing
#AWS
#LinuxAutomation
#DevOpsLearning
#ITAutomation