sudo chef-solo -c solo.rb -j node.json
NoMethodError
-------------
undefined method `cookbook_file' for Chef::Resource::Log
Cookbook Trace:
---------------
/Users/rossmohan/chef-repo/cookbooks/hellocookbook/recipes/hellorecipe.rb:5:in `block in from_file'
/Users/rossmohan/chef-repo/cookbooks/hellocookbook/recipes/hellorecipe.rb:3:in `from_file'
Relevant File Content:
----------------------
/Users/rossmohan/chef-repo/cookbooks/hellocookbook/recipes/hellorecipe.rb:
cookbook_file undefined? I thought that was a built-in?1: # This is a Chef recipe file. It can be used to specify resources which will
2: # apply configuration to a server.
3: log "Welcome to Chef, #{node["starter_name"]}!" do
4: level :info
5>> cookbook_file "helloworld.txt" do
6: path "/Users/rossmohan/HELLOWORLD.TXT"
7: action :create_if_missing
8: end
9: end
10:
rosss-air:chef-repo rossmohan$ pwd
/Users/rossmohan/chef-repo
rosss-air:chef-repo rossmohan$ ls cookbooks
apache2 apt chefignore hellocookbook starter
rosss-air:chef-repo rossmohan$ knife cookbook list
apache2 1.8.14
apt 2.3.8
hellocookbook 0.1.0
Archive powered by MHonArc 2.6.16.