[chef] Chef resources in vagrant provisioning


Chronological Thread 
  • From: Suresh Prajapati < >
  • To:
  • Subject: [chef] Chef resources in vagrant provisioning
  • Date: Sun, 2 Mar 2014 18:21:09 +0530

Hi,

I am trying to use this cookbook "https://github.com/cookbooks/nd-chef-hosts"

As per readme file I've created a vagrant file like this

VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "lucid64-customized"
  config.vm.network :public_network
  config.vm.provision :chef_solo do |chef|
    chef.cookbooks_path = "cookbooks"
    chef.add_recipe "nd-chef-hosts::example"
    #chef.log_level = :debug
  end

but when i "vagrant up --provision" . It throws this error

NoMethodError
-------------
No resource or method named `hosts' for `Chef::Recipe "example"'


Cookbook Trace:
---------------
  /tmp/vagrant-chef-1/chef-solo-1/cookbooks/nd-chef-hosts/recipes/example.rb:6:in `from_file'


Relevant File Content:
----------------------
/tmp/vagrant-chef-1/chef-solo-1/cookbooks/nd-chef-hosts/recipes/example.rb:


I've googled a lot but was not able to find the resolution for this problem.

Please help .

~cheers 



Archive powered by MHonArc 2.6.16.

§