Hi again,
I think that now I have it working with run_list:
search(:node, "run_list:role") do |server|
backend_servers << { "hostname" => server['hostname'], "ip" => server['ipaddress'] }
end
Is the correct procedure?
Sorry and thanks!
Jose Luis2009/8/13 Jose Luis Gordo Romero < " target="_blank"> >
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
Archive powered by MHonArc 2.6.16.