- From: Joshua Timberman <
>
- To: "<
>" <
>
- Subject: [chef] Re: Version contraints in metadata
- Date: Sun, 28 Apr 2013 13:30:21 +0000
- Accept-language: en-US
Ohai!
For what it's worth, the "supports" attribute of metadata does not do
anything at this time. It exists for documentation at this time.
If you'd like to have a recipe not get executed on a node of a non-supported
platform and do that through metadata, you can do that in the recipe (or as a
library with a method you send in the recipe).
For example:
https://gist.github.com/jtimberman/3695966
That doesn't support version constraint on platform_version in the
#supported_platform? predicate method, so you'd have to add that logic.
Related tickets:
http://tickets.opscode.com/browse/CHEF-3871
http://tickets.opscode.com/browse/CHEF-3870
Cheers,
Joshua
On Apr 26, 2013, at 8:52 AM, Gavin Sandie
<
>
wrote:
>
I've got a cookbook that I've tested on some versions of Ubuntu but not all.
>
>
In my metadata I'm wanting to do:
>
>
supports "ubuntu", ">= 11.04", "< 12.10"
>
>
The docs[1] suggest this cane be done, though the example is missing.
>
>
However "knife cookbook test" doesn't like it:
>
>
ERROR: Chef::Exceptions::ObsoleteDependencySyntax: The dependency
>
specification syntax you are using is no longer valid. You may not specify
>
more than one version constraint for a particular cookbook.
>
>
>
What's the best way to constrain my cookbook so that it will only run on OS
>
versions that I've tested it on?
>
>
For reference, this is running on chef 11.4.0.
Archive powered by MHonArc 2.6.16.