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::PlatformDependentValue#initialize
Create a platform dependent value object.
=== Arguments
platform_hash (Hash) a hash of the same structure as Chef::Platform,
like this:
{
:debian => {:default => 'the value for all debian'}
[:centos, :redhat, :fedora] => {:default => "value for all EL variants"}
:ubuntu => { :default => "default for ubuntu", '10.04' => "value for 10.04 only"},
:default => "the default when nothing else matches"
}
* platforms can be specified as Symbols or Strings
* multiple platforms can be grouped by using an Array as the key
* values for platforms need to be Hashes of the form:
{platform_version => value_for_that_version}
* the exception to the above is the default value, which is given as
:default => default_valueEdit
git clone [email protected]:opscode/chef.git
cd chef
open lib/chef/dsl/platform_introspection.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Chef--DSL--PlatformIntrospection--PlatformDependentValue-initialize-for-pr
# Commit to gitgit add lib/chef/dsl/platform_introspection.rbgit commit -m "better docs for Chef::DSL::PlatformIntrospection::PlatformDependentValue#initialize"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Chef--DSL--PlatformIntrospection--PlatformDependentValue-initialize-for-pr
hub pull-request
# Celebrate!