chef
https://github.com/opscode/chef
Ruby
A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure.
Chef::Cookbook::Metadata#attribute
Adds an attribute that a user needs to configure for this cookbook. Takes
a name (with the / notation for a nested attribute), followed by any of
these options
display_name<String>:: What a UI should show for this attribute
description<String>:: A hint as to what this attr is for
choice<Array>:: An array of choices to present to the user.
calculated<Boolean>:: If true, the default value is calculated by the recipe and cannot be displayed.
type<String>:: "string" or "array" - default is "string" ("hash" is supported for backwards compatibility)
required<String>:: Whether this attr is 'required', 'recommended' or 'optional' - default 'optional' (true/false values also supported for backwards compatibility)
recipes<Array>:: An array of recipes which need this attr set.
default<String>,<Array>,<Hash>:: The default value
=== Parameters
name<String>:: The name of the attribute ('foo', or 'apache2/log_dir')
options<Hash>:: The description of the options
=== Returns
options<Hash>:: Returns the current options hashEdit
git clone [email protected]:opscode/chef.git
cd chef
open lib/chef/cookbook/metadata.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Chef--Cookbook--Metadata-attribute-for-pr
# Commit to gitgit add lib/chef/cookbook/metadata.rbgit commit -m "better docs for Chef::Cookbook::Metadata#attribute"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Chef--Cookbook--Metadata-attribute-for-pr
hub pull-request
# Celebrate!