chef

https://github.com/opscode/chef

Ruby

A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure.

Chef::DSL::PlatformIntrospection::PlatformFamilyDependentValue#initialize

Create a platform family dependent value object.
=== Arguments
platform_family_hash (Hash) a map of platform families to values.
like this:
  {
    :rhel => "value for all EL variants"
    :fedora =>  "value for fedora variants fedora and amazon" ,
    [:fedora, :rhel] => "value for all known redhat variants"
    :debian =>  "value for debian variants including debian, ubuntu, mint" ,
    :default => "the default when nothing else matches"
  }
* platform families can be specified as Symbols or Strings
* multiple platform families can be grouped by using an Array as the key
* values for platform families can be any object, with no restrictions. Some examples:
  - [:stop, :start]
  - "mysql-devel"
  - { :key => "value" }

Source | Google | Stack overflow

Edit

git clone [email protected]:opscode/chef.git

cd chef

open lib/chef/dsl/platform_introspection.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Chef--DSL--PlatformIntrospection--PlatformFamilyDependentValue-initialize-for-pr


# Commit to git

git add lib/chef/dsl/platform_introspection.rbgit commit -m "better docs for Chef::DSL::PlatformIntrospection::PlatformFamilyDependentValue#initialize"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Chef--DSL--PlatformIntrospection--PlatformFamilyDependentValue-initialize-for-pr

hub pull-request


# Celebrate!