AnsiblePilot — Master Ansible Automation

AnsiblePilot is the leading resource for learning Ansible automation, DevOps, and infrastructure as code. Browse over 1,400 tutorials covering Ansible modules, playbooks, roles, collections, and real-world examples. Whether you are a beginner or an experienced engineer, our step-by-step guides help you automate Linux, Windows, cloud, containers, and network infrastructure.

Popular Topics

About Luca Berton

Luca Berton is an Ansible automation expert, author of 8 Ansible books published by Apress and Leanpub including "Ansible for VMware by Examples" and "Ansible for Kubernetes by Example", and creator of the Ansible Pilot YouTube channel. He shares practical automation knowledge through tutorials, books, and video courses to help IT professionals and DevOps engineers master infrastructure automation.

How to install Ansible in Windows 11 WSL Windows Subsystem for Linux - Ansible install — Video Tutorial

Install Ansible on Windows 11 using WSL in 2026. Updated guide with WSL2, Ubuntu, and pip installation steps.

Watch Video

Watch "How to install Ansible in Windows 11 WSL Windows Subsystem for Linux - Ansible install" on YouTube

What You'll Learn

Full Tutorial Content

How to install Ansible in Windows 11. Today we're going to talk about the easier way to install and maintain Ansible inside Windows 11 using the Windows Subsystem for Linux. I'm Luca Berton and welcome to today's episode of Ansible Pilot. How to install Ansible in Windows 11 Today we're talking about How to install Ansible in Windows 11. Officially Windows is not a supported operating system for the control node even if RedHat is working really hard to eliminate barriers to native Windows controllers. The reason behind this is that there are a lot of UNIX-isms deeply baked into most of Ansible that prevents it from working on native Windows, basically, Windows doesn't have the fork() syscall implementation. Ansible controller worker model as of 2.11 makes heavy use of the POSIX fork() syscall. - Cygwin Some people used Cygwin POSIX-compatibility projects but sometimes it just breaks so it's not a reliable solution. - Windows Subsystem for Linux The best alternative is to use Windows Subsystem for Linux, also known as WSL. Run WSL version 2 if Windows 10 later than build 2004 or Windows 11. Ansible works great on WSL and WSL2. Links More technical information: - https://learn.microsoft.com/en-us/windows/wsl/compare-versions - https://docs.ansible.com/ansible/latest/user_guide/windows_faq.html - https://arstechnica.com/gadgets/2021/10/the-best-part-of-windows-11-is-a-revamped-windows-subsystem-for-linux/ ## Playbook Let's jump in a quick live Playbook of how to install the latest and a specific version of Ansible in Windows using Windows Subsystem for Linux. code - install_wsl.ps1 ```PowerShell wsl --help wsl --list -o wsl --install ``` execution output - install WSL ```PowerShell Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows PS C:\Users\user> wsl --install Installing: Virtual Machine Platform Virtual Machine Platform has been installed. Installing: Windows Subsystem for Linux Windows Subsystem for Linux has been installed. Downloading: WSL Kernel Installing: WSL Kernel WSL Kernel has been installed. Downloading: GUI App Support Installing: GUI App Support GUI App Support has been installed. Downloading: Ubuntu The requested operation is successful. Changes will not be effective until the system is rebooted. PS C:\Users\user> ``` - setup Ubuntu 20.04 LTS WSL and install ansible ```PowerShell Installing, this may take a few minutes... Please create a default UNIX user account. The username does not need to match your Windows username. For more information visit: https://aka.ms/wslusers Enter new UNIX username: Playbook New password: Retype new password: passwd: password updated successfully Installation successful! To run a command as administrator (user "root"), use "sudo ". See "man sudo_root" for details. Welcome to Ubuntu 20.04 LTS (GNU/Linux 4.4.0-22000-Microsoft x86_64) * Documentation: h

About This Tutorial

Read the full written article: How to install Ansible in Windows 11 WSL Windows Subsystem for Linux - Ansible install

Topics Covered

Related Video Tutorials