search
This commit is contained in:
@@ -59,8 +59,8 @@ if Chef::Config[:solo]
|
||||
Chef::Log.warn("This recipe uses search. Chef Solo does not support search.")
|
||||
else
|
||||
# Lookup keystone api ip address
|
||||
keystone, something, result_count = Chef::Search::Query.new.search(:node, "roles:keystone AND chef_environment:#{node.chef_environment}")
|
||||
if result_count > 0
|
||||
keystone, something, arbitrary_value = Chef::Search::Query.new.search(:node, "roles:keystone AND chef_environment:#{node.chef_environment}")
|
||||
if keystone.length > 0
|
||||
Chef::Log.info("Using Keystone attributes from SEARCH")
|
||||
keystone_api_ip = keystone[0]['keystone']['api_ipaddress']
|
||||
keystone_service_port = keystone[0]['keystone']['service_port']
|
||||
|
||||
@@ -59,8 +59,8 @@ if Chef::Config[:solo]
|
||||
Chef::Log.warn("This recipe uses search. Chef Solo does not support search.")
|
||||
else
|
||||
# Lookup keystone api ip address
|
||||
keystone, something, result_count = Chef::Search::Query.new.search(:node, "roles:keystone AND chef_environment:#{node.chef_environment}")
|
||||
if result_count > 0
|
||||
keystone, something, arbitrary_value = Chef::Search::Query.new.search(:node, "roles:keystone AND chef_environment:#{node.chef_environment}")
|
||||
if keystone.length > 0
|
||||
Chef::Log.info("Using Keystone attributes from SEARCH")
|
||||
keystone_api_ip = keystone[0]['keystone']['api_ipaddress']
|
||||
keystone_service_port = keystone[0]['keystone']['service_port']
|
||||
|
||||
@@ -59,8 +59,8 @@ if Chef::Config[:solo]
|
||||
Chef::Log.warn("This recipe uses search. Chef Solo does not support search.")
|
||||
else
|
||||
# Lookup keystone api ip address
|
||||
keystone, something, result_count = Chef::Search::Query.new.search(:node, "roles:keystone AND chef_environment:#{node.chef_environment}")
|
||||
if result_count > 0
|
||||
keystone, something, arbitrary_value = Chef::Search::Query.new.search(:node, "roles:keystone AND chef_environment:#{node.chef_environment}")
|
||||
if keystone.length > 0
|
||||
Chef::Log.info("Using Keystone attributes from SEARCH")
|
||||
keystone_api_ip = keystone[0]['keystone']['api_ipaddress']
|
||||
keystone_service_port = keystone[0]['keystone']['service_port']
|
||||
|
||||
@@ -38,8 +38,8 @@ if Chef::Config[:solo]
|
||||
Chef::Log.warn("This recipe uses search. Chef Solo does not support search.")
|
||||
else
|
||||
# Lookup keystone api ip address
|
||||
keystone, something, result_count = Chef::Search::Query.new.search(:node, "roles:keystone AND chef_environment:#{node.chef_environment}")
|
||||
if result_count > 0
|
||||
keystone, something, arbitrary_value = Chef::Search::Query.new.search(:node, "roles:keystone AND chef_environment:#{node.chef_environment}")
|
||||
if keystone.length > 0
|
||||
Chef::Log.info("Using Keystone attributes from SEARCH")
|
||||
keystone_api_ip = keystone[0]['keystone']['api_ipaddress']
|
||||
keystone_admin_port = keystone[0]['keystone']['admin_port']
|
||||
|
||||
Reference in New Issue
Block a user