So I have this piece of code:
node['nginx'][0]['server_name']='black.domain.com'
node['nginx'][0]['app_server']='http://10.50.0.163:8090'
node['nginx'][0]['redirect_path']='/mesh'
node['nginx'][1]['server_name']='red.domain.com'
node['nginx'][1]['app_server']='http://10.50.0.163:8090'
node['nginx'][1]['redirect_path']='/mesh'
node.default['nginx'].each do |key, value|
value.each do |prop|
Chef::Log.info prop['app_server']
end
end
Like the title says it's erorring out on:
21>> Chef::Log.info prop['app_server']
My question is how do I loop though this associative array?
Best, -Iulian
you can loop through
node['nginx']
like this. (i don't know whatnode.default['nginx']
is supposed to be)