Automated Vagrant with Ansible install for Windows
At https://github.com/darkedges/WinVagInsAns is a Powershell script for Windows that installs Babun, Vagrant, VirtualBox and Ansible. It does all the configuration so that you don’t have to and once completed will give you a fully working Ansible Provisioner in Vagrant.
Installation
This has been tested on Windows 7 Default Powershell V2. Other versions of OS / Powershell may have issues. It requires an environmental WINVAGINSANS to be set for where the software is to be installed. Note: This is for a clean install only. Existing installations will not work.
It performs the following steps
- Installs Babun.
- Installs Vagrant.
- Installs Virtual Box.
- Creates the necessary Environmental Variables.
- Creates the ansible-playbook.bat wrapper in the Vagrant Installation directory.
- Creates the InstallAnsible.sh wrapper for installation and configuration of Ansible in Babun.
- Executes the InstallAnsible.sh wrapper.
- Rebases Babun.
Powershell
[code]<code>$env:WINVAGINSANS="d:\vm"; iex((new-object net.webclient).DownloadString(‘https://raw.githubusercontent.com/darkedges/WinVagInsAns/v1.0/WinVagInsAns.ps1’))[/code]
Windows CMD
[code]@powershell -NoProfile -ExecutionPolicy Bypass -Command "$env:WINVAGINSANS="d:\vm"; iex((new-object net.webclient).DownloadString(‘https://raw.githubusercontent.com/darkedges/WinVagInsAns/v1.0/WinVagInsAns.ps1’))"[/code]
Acknowledgements
The following resources have been helpful in generating this process.