[chef] Search Index and roles


Chronological Thread 
  • From: Jose Luis Gordo Romero < >
  • To:
  • Subject: [chef] Search Index and roles
  • Date: Thu, 13 Aug 2009 10:40:44 +0200
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=mS6zuIb8QN0osbfB27qn9kNuWChiWqEmrGXmx8Bn8Dbr6xBdBVnM494m312rFVNDvD CVQ2yImx7Rwve/yCsjz8RhUErycE8/aYOkMzOaNtm8zq16aHUh6BwF5vF/Y0UWdrM2+C KAk0v0FefFsMvsF/ktSJjyNEmcC/wJS6LAeL4=

Hi!

I'm writing a cookbook that uses search to find nodes with a certain role in their run_list:

search(:node, "role:somorole") do |server|
   backend_servers << { "hostname" => server['hostname'],  "ip" => server['ipaddress'] }
end

But nothing is returned, then I test:

search(:node, "recipe:ubuntu") do |server|
  backend_servers << { "hostname" => server['hostname'],  "ip" => server['ipaddress'] }
end

But nothing is returned too, I'm sure that I have nodes with the role or recipes (from roles).

search(:node, "*") do |server|
  backend_servers << { "hostname" => server['hostname'],  "ip" => server['ipaddress'] }
end

Is working with all nodes, so:

Is that roles or recipes through roles in search in not supported?

Thanks in advance
Jose Luis




  • [chef] Search Index and roles, Jose Luis Gordo Romero, 08/13/2009

Archive powered by MHonArc 2.6.16.

§