Im using Cygwin (CYGWIN_NT-6.3-WOW64) under Windows 8. I also run Vagrant (1.7.2) and Ansible (1.8.4). To be complete, my Virtualbox is 4.3.22.
Cygwin and Vagrant were installed from their respective Windows installation packages. Im running Python 2.7.8 under Cygwin and using 'pip install ansible to install Ansible.
All of these applications work great on their own. Cygwin works great; I use it as my shell all day, every day without any problems.
Vagrant and Virtualbox also work without problems when I run Vagrant under Cygwin. Ansible works great under Cygwin when I run games or modules against servers on my network.
The problem I am facing is that I am trying to use Ansible to make Vagrant VM work locally.
For example, I vagrant up virtual machine, and then create a simple book to play it. Below is the Vagrantfile:
VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.define :drupal1 do |config| config.vm.box = "centos65-x86_64-updated" config.vm.hostname = "drupal1" config.vm.network "forwarded_port", guest: 80, host: 10080 config.vm.network :private_network, ip: "192.168.56.101" config.vm.provider "virtualbox" do |v| v.name = "Drupal Server 1" v.memory = 1024 end config.vm.provision :ansible do |ansible| ansible.playbook = "provisioning/gather_facts.yml" end end
and playbook:
--- - hosts: all gather_facts: yes
However, when I run the "abusive drupal1 provisioning", I get the following error:
brokerage software drupal1 ==> drupal1: Launching the creator: ansible ... PYTHONUNBUFFERED = 1 ANSIBLE_FORCE_COLOR = true ANSIBLE_HOST_KEY_CHECKING = false ANSIBLE_SSH_ARGS = '- o UserKnownHostsFile = / devMaster-null-auto-script 60 private key = C: /Users/mjenkins/workspace/Vagrant_VMs/Drupal1/.vagrant/machines/drupal1/virtualbox/private_key --user = vagrant --connection = ssh --limit = 'drupal1' --inventory-file = C : /Users/mjenkins/workspace/Vagrant_VMs/Drupal1/.vagrant/provisioners/ansible/inventory provisioning / gather_facts.yml PLAY [all] COMMON FACTS fatal: [drupal1] => private_key_file (C: / Users / mjenkins / workVs / vagrant /Drupal1/.vagrant/machines/drupal1/virtualbox/private_key) is read in groups or read in the world and is therefore unsafe - you will probably get SSH failure. PLAY RECAP
to try again, use: -limit @ / home / mjenkins / gather_facts.retry
drupal1: ok = 0 changed = 0 unreachable = 1
failed = 0 Ansible failed to complete successfully. Any output errors should be visible above. Correct these errors and try again. Looking at the error, it is obvious that she has something to do with the Ansibles interpretation of my key and the permissions for either it or the folder in which it is located.
Here are some notes and steps I tried:
I tried to set permissions for the file and all directories leading to the file in Cygwin. This is chmod -R 700 .vagrant in the project directory. There was still the same error.
The key file is referenced using the Windows path and not the Cygwin path (it is odd, however, that the file in the terminal output has the Cygwin path). So I checked the permissions on the Windows side and changed them so that "everyone does not have access to .vagrant and all the files / folders under it. Still the same error.
Then I thought that there might still be problems with file permissions / paths between my Ansible based on Cygwin, so I installed Python for Windows; used this item to install Ansible, installed my paths to this place, created the ansible-playbook.bat file and launched Vagrant from the windows shell. Glad to say that the tool chain worked ... but I still had the same problem.
At this point, I'm just out of ideas, so I appeal to you, friends of Stackoverflow, for your input.
Any thoughts on solving this problem?