Vagrant + Chef error

4

I have a centos instance mounted with vagrant but I am having problems to be able to provision git and composer.

Let's see if you can throw me a cable.

    config.vm.provision "chef_solo" do |chef|
    chef.cookbooks_path = "cookbooks"
    chef.add_recipe "chef-sugar"    
    chef.add_recipe "seven_zip"     
    chef.add_recipe "apt"
    chef.add_recipe "openssl"
    chef.add_recipe "build-essential"
    chef.add_recipe "composer"
    chef.add_recipe "git"
end

I downloaded all the supermarket cookbook.

The error I get is the following:

  

== > default: Running handlers:

     

== > default: [2016-04-14T14: 21: 56 + 01: 00] ERROR: Running exception handlers

     

== > default: Running handlers complete

     

== > default: [2016-04-14T14: 21: 56 + 01: 00] ERROR: Exception handlers complete

     

== > default: Chef Client failed. 0 resources updated in 01 seconds

     

== > default: [2016-04-14T14: 21: 56 + 01: 00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out

     

== > default: [2016-04-14T14: 21: 56 + 01: 00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report

     

== > default: [2016-04-14T14: 21: 56 + 01: 00] ERROR: Cookbook windows not found. If you're loading windows from another cookbook, make sure you   configure the dependency in your metadata

     

== > default: [2016-04-14T14: 21: 56 + 01: 00] FATAL: Chef :: Exceptions :: ChildConvergeError: Chef run process exited   unsuccessfully (exit code 1) Chef never successfully completed! Any   errors should be visible in the output above. Please fix your recipes   so that they properly complete.

Thanks and best regards

    
asked by Raúl Quiros 14.04.2016 в 15:31
source

1 answer

2

The problem you have is that Chef is not finding the cookbooks on your system, the chef.cookbooks_path property has the default directory cookbooks as a value, relative to the location of vagrantfile , so it should be something like this:

-Vagranfile | - / cookbooks

Verify that your structure fits this.

Vangrant Documentation: link

    
answered by 14.04.2016 в 16:09