I have several ubuntu machines that I need to configure the same way, so I use chef-solo against cook cookbooks in a read-only shared directory to accomplish this. I have been using chefs for over a year, starting with version 10 chefs. Today, after restoring virtual machines using a packer (I use virtual machines to test my cookbooks before using them on "real" machines, and rebuild them periodically therefore "fresh") my cookbooks started with the error:
ERROR: Cookbook loaded at path(s) [/chef/cookbooks/ack-grep] has invalid metadata: The `name' attribute is required in cookbook metadata
I used these cookbooks on several machines many times, tested them several times in virtual machines, but I noticed that the recently restored VM installed chef 12.0.0. Older VM works Chef 11 still works great. This is true for each of my cookbooks.
I started to research and investigate this problem using google, and all I found on this issue was to put the "name" entry in the metadata.rb file. But my metadata.rb files already contain the name entry. For example, here is my metadata file (edited so as not to explode my personal information in a forum accessible only to Google):
---- Begin metadata.rb ---------
name 'ack-grep'
maintainer 'me'
maintainer_email 'me@example.com'
license 'All Rights Reserved'
description 'Installs/Configures ack-grep'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.1.0'
------ End metadata.rb -------
One recipe that is in this cookbook is very simple:
------ Start default.rb -------
package 'ack-grep' do
action :install
end
------ Finish default.rb -------
, , , metadata.json , :
ack-grep
metadata.json, "" , metadata.rb, , json. chef-solo .
, , , metadata.rb, metadata.json, - , . - , , , ? , /?