Am learning chef by self study,am unable create a file inside my chef cook book
Fallowing are my steps,which i've done in linux instance
vi test-cookbook/recipes/test-recipe.rd
, which looks like:
file '/myfile' do
content 'hello'
action:create
endchef exec ruby -c test-cookbook/recipes/test-recipe.rb
& the result is "Sytax ok"now i gave this command chef-client -zr "recipe[test-cookbook::test-rescipe]
, which is throwing me error:
Missing Cookbooks:
------------------
No such cookbook: test-cookbook
this happens since you did not configure chef-client correctly. you are missing the client.rb
file and the settings cookboook_path
within it.