- From: Lamont Granquist <
>
- To:
- Subject: [chef] Re: Re: Re: Re: How to NOT run a complete recipe?
- Date: Tue, 29 Sep 2015 14:12:16 -0700
It will not local jump. A concrete example from our internal
cookbooks, if you want to have a recipe that is safe to include in
the run_list on windows boxes, but which NOPs the recipe you can do
this:
return if platform_family?("windows")
# stuff that works on linux and would make windows uphappy...
[...]
On 09/29/2015 08:46 AM, Ranjib Dey
wrote:
"
type="cite">
not sure if return will work, you might get a local
jump error, since the recipes are instance_evaled.
you should do this on top level recipe or wrapper recipes,
i.e check for the condition, and include_recipe
accordingly., i.e.
# in parent recipe cookbook::parent
if node.foo.bar
include_recipe 'cookbook::child'
end
|
Archive powered by MHonArc 2.6.16.