Running Ansible on Windows through Cygwin

For various reasons I’m mostly on Windows machines at work and at home but prefer to develop in Linux and provision with Ansible.

The Server Checkin blog has a great post on setting this up I had a few things I needed to do differently or in addition to the directions there I wanted to jot down for myself and in case anyone found it useful.

Bash the right thing

The directions point to setting up the ansible config settings in .bash_profile but in cygwin it points you to using (as on many bash setups) .bashrc instead so just make those changes in .bashrc instead.

Updating git submodules

The master branch checkout of Ansible I used for my setup needed a few updates for submodules.  I discovered this from some output after running `ansible –version`.  To update those just `cd /opt/ansible` and run:

  • git submodule update –init lib/ansible/modules/core
  • git submodule update –init lib/ansible/modules/extras
  • git submodule update –init v2/ansible/modules/core
  • git submodule update –init v2/ansible/modules/extras

After that it seemed to work fine for me, though I’m still trying to get over the Vagrant hurdle it mentions at the end of the post.