This is partly based on instructions from https://servercheck.in/blog/running-ansible-within-windows but uses a virtual environment and no checking out from Github / manually installing packages.
- Install Cygwin. Include following packages:
- python
- openssl / openssl-devel
- python-crypto
- python-openssl
- openssh
- Install & configure pip, virtualenv & virtualenvwrapper as per http://atbrox.com/2009/09/21/how-to-get-pipvirtualenvfabric-working-on-cygwin/
- Create a virtual environment for ansible with
mkvirtualenv --system-site-packages ansi
- Install ansible inside your virtual environment with
pip install ansible pyyaml jinja2
That’s it (remember to set ssh_args = -o ControlMaster=no
in ansible.cfg as cygwin doesn’t support it).