How to make Ansible actually work on Windows using Windows Subsystem for Linux (WSL)

John M. Kuchta
1 min readSep 3, 2020

This, someday, may be a prettier, more detailed read. Right now it’s just a stub, but if you’re adventurous, hopefully it helps.

Guide pre-requisites

  • WSL2 support, included in Win10 2004 and later
  • A supported Linux distro already installed (this guide uses Ubuntu)
  • Familiarity with Ansible’s normal install procedure on the preferred Linux platform

Outline

  1. Install Ansible according to the official Ansible documentation in your WSL shell (bash, in my case)
  2. Enable WSL permissions metadata feature
  3. Install libc6 (Ansible pre-req on WSL) (sudo apt install libc6)
  4. Configure your environment variables (using WSLENV to share variables between Windows and WSL, or ~/.bash_profile if you only want to use them in WSL)

--

--

John M. Kuchta

Information infrastructure evangelist // WiFi engineer // Film nerd