How to make Ansible actually work on Windows using Windows Subsystem for Linux (WSL)
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
- Install Ansible according to the official Ansible documentation in your WSL shell (bash, in my case)
- Enable WSL permissions metadata feature
- Install libc6 (Ansible pre-req on WSL) (sudo apt install libc6)
- 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)