|REM If you used the standard Cygwin installer this will be C:\cygwin|
|REM You can switch this to work with bash with %CYGWIN%\bin\bash.exe|
|if not exist "%SH%" (|
|echo cygwin's sh.exe not found. Did you delete %CYGWIN% ?|
|exit /b 255|
|"%SH%" -c "[[ -x "%COMMAND%" ]]"|
|if not errorlevel 0 (|
|echo %COMMAND% not found. Did you uninstall it ?|
|exit /b 255|
|"%SH%" -c "%*"|
Great blog post, thank you! I've successfully used it to get Vagrant AWS with Ansible provisioning running from my Windows 8.1 machine.
I had two further issues, which I think are to do with working with the AWS plugin: I found that I was getting ssh
It seemed to be impossible to chmod the keyfile in its
Therefore, I found I had to modify the ansible-playbook parameters (generated by vagrant) using sed:
I hope this helps anyone else who has similar problems!
Thanks again for getting me to that point!
@woodcoder Unfortunately, your solution did not work for me but I was able to come up with a complicated workaround involving sshpass, disabling host checking, copying private_key to ~/private_key, setting permissions on it, and then running my Ansible command manually instead of "vagrant provision" once the VM was already up.
There really should be a better solution to handling this on Windows. Maybe I missed the boat and just disabling host checking would have been enough but what a nightmare!
Are you able to get
Okay so I got it to work.
Ansible complains that it can't find the
@CelC thanks for sharing -- really useful!
I tried to follow suit, by putting the cp/chmod in the batch file, but it doesn't work for me. For some reason the zsh login shell ends up mounting
Also, in running the batch file on a new install on a colleagues machine, we ran into issues with the sed backreferences failing. I suspect it's to do with a version bump somewhere, but anyway, I ended up with the following, which works again:
@woodcoder, this post really helped me out and I ended up handling the private_keys somewhat differently: https://gist.github.com/jonathanhle/ff41bafb7c66efd72f78
Seems to work for me just fine - I'm not sure why I have to cd to specific directory to chmod/setfacl the private_key, but it does work on my Windows machine. Hope it works for you.
Thanks everyone, this post really helped me out.
The private key configuration got moved inside the auto-generated inventory file in vagrant 1.7.3.
Problem of repeated project root path with ansible/vars/app with ansible-playbook.bat
Copied ansible-playbook.bat from
I got the following command expression, it's executable with vagrant/Windows/babun:
The error above seems that in the path for ansible/vars/app the path for my project
I examed the
Here is the content of