- From: AJ Christensen <
>
- To: chef <
>
- Subject: [chef] Re: Re: Re: searching with chef
- Date: Wed, 6 Mar 2013 08:33:09 +1300
I would be on-board with that; Discovery has always been positioned
this way. Potentially with support for Partial searches?
--AJ
On 6 March 2013 07:37, Adam Jacob
<
>
wrote:
>
I wonder if we should move some of that into the core DSL. Super useful,
>
non intrusive.
>
>
Adam
>
>
On 3/4/13 3:12 PM, "AJ Christensen"
>
<
>
>
wrote:
>
>
>on the CLI, you can pass the '-a / --attribute' flag to get a
>
>particular attribute tree from the object.
>
>
>
>In the recipe, it'll look something like
>
>
>
>servers = search(:node, "roles:bar AND chef_environment:production")
>
>server = servers.first
>
>ip = server['ipaddress'] # Just a Chef::Node object here.
>
>
>
>Check out Heavy Water's discovery cookbook for some recipe helpers,
>
>like 'empty ok?', local node fall-back, environment aware search, sort
>
>by check-in time & cloud-aware IP addressing preferences. [0]
>
>
>
>--AJ
>
>
>
>[0] http://ckbk.it/discovery
>
>
>
>On 5 March 2013 12:08, Maven User
>
><
>
>
> wrote:
>
>> Hi guys -
>
>>
>
>> I'm struggling a bit with searching within chef...
>
>>
>
>> I'm trying to select all nodes that have a given role in a particular
>
>> environment.
>
>>
>
>> I realize I can do something like:
>
>>
>
>> knife search node "roles:<rolename>" -E <environmentname>
>
>>
>
>> But how do I get things like the ip address from that object?
>
>
>
>
Archive powered by MHonArc 2.6.16.