[chef] Search in Chef 11


Chronological Thread 
  • From: " " < >
  • To: chef < >
  • Subject: [chef] Search in Chef 11
  • Date: Tue, 29 Jul 2014 01:13:41 -0500

Hello,

We are trying to run a little complex search query in one of our recipes which looks something like:

search(:node, "my_attribute:test AND (roles:first_role OR roles:second_role OR roles:third_role OR roles:fourth_role)")

The idea being to retrieve all nodes which have a particular attribute set and has one of the given roles on its runlist. Is the above query the best way to write that? The problem is this used to work fine with Chef 10 but has started failing with Chef 11.

Any help will be greatly appreciated.

Thanks,

--
Swarnim



Archive powered by MHonArc 2.6.16.

§