[chef] Re: Search on included cookbooks


Chronological Thread 
  • From: Tensibai Zhaoying < >
  • To: sd < >
  • Cc:
  • Subject: [chef] Re: Search on included cookbooks
  • Date: Thu, 22 Jan 2015 21:33:49 +0100

You can search on expanded_runlist, depending on your chef client version.

I'm using chef server open source in 11.0.4 and my workstation is with a chef client 11.16.4 and I did searches with knife on the expanded_runlist attribute like knife search node expanded_runlist:*tomcat* orange with knife exec for more complex ones. I'm spelling the attribute from memory, use a knife node show with -F json to see it properly...

I'll be able to redo a search like this at work tomorrow to give real Exemple if no one answer before

Le 22 janv. 2015 21:03, sd < > a écrit :
Hi,

You can find the cookbooks used by a node's run list by doing a search.
All good as long as you use all cookbooks into the run list or you have a role.
I'm referring to something like this

run_list ["wrap_cookbook"]

And into wrap_cookbook::default you could have something like

include_recipe "cookbook_one"
include_recipe "cookbook_two"

So what I want is to search on the chef server and see what nodes use cookbook_one.

thanks!

-silviu


On Thu, Jan 22, 2015 at 2:45 PM, Tensibai Zhaoying <tensibai@iabis.net> wrote:

The best idea coming to my head is doing a comparison between runlist and expanded runlist, but it involves handling roles...

Unsure of what you mean with chef search, if it's to filter nodes having a recipe by includes that's ok but if it's to know which recipe is included that's harder, knife-audit is a good candidate  for the last option.

All in all, can you give a use case for cleaner answer ?

Le 22 janv. 2015 20:10, sd <dioda11@gmail.com> a écrit :

Hi,

Not sure if this is available in the latest version but is possible to see the cookbooks
included from other cookbooks by doing a chef search ?


thanks!

-silviu






Archive powered by MHonArc 2.6.16.

§