Each cookbook contains a metadata.rb
file in the root directory of the cookbook that contains information about the cookbook itself, such as who maintains it, the license, version, contained recipes, supported platforms, and the cookbook's dependencies. The contents of this script are used to generate a JSON file that describes the cookbook, which is used by the Chef server for dependency resolution, searching and importing into run lists.
This is a required file for a cookbook, and here is an example metadata.rb
file from the PostgreSQL database server, which is slightly modified to fit the following:
name "postgresql" maintainer "Opscode, Inc." maintainer_email "[email protected]" license "Apache 2.0" description "Installs and configures PostgreSQL" long_description IO.read(File.join( File.dirname(__FILE__), 'README.md' )) version "3.3.4" recipe "postgresql", "Includes postgresql...