Easy Ansible provisioning withing Vagrant running under Windows

It’s not a big secret Ansible is not supported under Windows, therefore default Ansible plugin for Vagrant is not working.

It is still possible to run Ansible from within Vagrant VM (Ubuntu) without changing almost anything:

internal-ansible.sh

Create the following “internal-ansible.sh” file within your Vagrant root:

  • Change ‘vagrant.yml’ to whatever your root Ansible script you have

Vagrantfile

Comment out Ansible provisioner section within your Vagrantfile and add bash provisioner instead. Your file should look like the following:

 

Enjoy!

Leave a Reply

Your email address will not be published. Required fields are marked *