Running Ansible from Windows
If you browse the official installation documentation for Ansible, you will find a variety of instructions for most mainstream Linux variants, Solaris, macOS, and FreeBSD. You will note, however, that there is no mention of Windows. There is a good reason for this – for those interested in the technical detail, Ansible makes extensive use of the POSIX fork()
syscall in its operations, and no such call exists on Windows. POSIX compatibility projects, such as the venerable Cygwin, have attempted to implement fork()
on Windows, but sometimes this does not work correctly even today. As a result, despite there being a viable Python implementation for Windows, Ansible cannot be run natively on this platform without the presence of this important syscall.
The good news is that, if you are running recent versions of Windows 10, or Windows Server 2016 or 2019, installing and running Ansible is now incredibly easy thanks to Windows Subsystem for Linux ...