diff options
author | Jordan Evans <jordane@osuosl.org> | 2014-08-18 09:39:41 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2014-08-21 12:38:17 -0700 |
commit | d7fe2346c9c15799bb2218630a59b49e44d17d8d (patch) | |
tree | ee61bb1edad14ebb7a717034f859d5b7706c77e8 /DOC_CHANGES.md | |
parent | acf26e61a35b8a963ea96c68a2f2cb66a991ddc5 (diff) | |
download | chef-d7fe2346c9c15799bb2218630a59b49e44d17d8d.tar.gz |
add value_for_platform to DOC_CHANGES.md
Diffstat (limited to 'DOC_CHANGES.md')
-rw-r--r-- | DOC_CHANGES.md | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/DOC_CHANGES.md b/DOC_CHANGES.md index 1a40d6730f..7ce531b3b5 100644 --- a/DOC_CHANGES.md +++ b/DOC_CHANGES.md @@ -6,6 +6,29 @@ Example Doc Change: Description of the required change. --> +### value_for_platform Method + +- where <code>"platform"</code> can be a comma-separated list, each specifying a platform, such as Red Hat, openSUSE, or Fedora, <code>version</code> specifies the version of that platform, and <code>value</code> specifies the value that will be used if the node's platform matches the <code>value_for_platform</code> method. If each value only has a single platform, then the syntax is like the following: ++ where <code>platform</code> can be a comma-separated list, each specifying a platform, such as Red Hat, openSUSE, or Fedora, <code>version</code> specifies either the exact version of that platform, or a constraint to match the platform's version against. The following rules apply to constraint matches: + ++ * Exact matches take precedence no matter what, and should never throw exceptions. ++ * Matching multiple constraints raises a <code>RuntimeError</code>. ++ * The following constraints are allowed: <code><,<=,>,>=,~></code>. ++ ++ The following is an example of using the method with constraints: ++ ++ ```ruby ++ value_for_platform( ++ "os1" => { ++ "< 1.0" => "less than 1.0", ++ "~> 2.0" => "version 2.x", ++ ">= 3.0" => "version 3.0", ++ "3.0.1" => "3.0.1 will always use this value" } ++ ) ++ ``` + ++ If each value only has a single platform, then the syntax is like the following: + ### environment attribute to git provider Similar to other environment options: @@ -29,6 +52,7 @@ Current documentation states: This is no longer correct as of 12.0. The `name` field is required; if it is not specified, an error will be raised if it is not specified. + ### chef-zero port ranges - to avoid crashes, by default, Chef will now scan a port range and take the first available port from 8889-9999. |