- From: Adam Jacob <
>
- To:
- Subject: [chef] Re: Search Doesn't Work in Attributes Files
- Date: Fri, 21 Oct 2011 15:37:55 -0700
Yep - you should be doing search from recipes, but not from attribute
files. In general, any time you are computing a value and using it as
an attribute you likely want to do that in a recipe (it avoids some
interesting issues with when new data gets applied to your
attributes.)
You can still do everything you want - just set node.default and move along.
Best,
Adam
On Fri, Oct 21, 2011 at 2:38 PM,
<
>
wrote:
>
Hi, I am running Chef 0.10.4 and trying to use search to define default
>
attributes within an attribute file but it doesn't seem to be working. Even
>
running,
>
>
search(:node, "*:*") do |matching_node|
>
puts matching_node.to_s
>
end
>
>
I am able to run this successfully within a recipe, but I was wondering is
>
this
>
the desired functionality?
>
--
Opscode, Inc.
Adam Jacob, Chief Product Officer
T: (206) 619-7151 E:
Archive powered by MHonArc 2.6.16.