This should be something simple and not sure what I am missing here.
I have a simple node attribute definition with a multi-value attribute as
default[‘onbio’][‘apps’] = [‘east’,‘west’,‘north’,‘south’]
I am trying to loop through each element of the attributes in my recipe with the code
node[‘onbio’][‘apps’].each do |app|
if #{app} == ‘west’
check_interval_flag = 1
appname = #{app}
end
end
The recipe fails with the error
undefined method `[]’ for nil:NilClass
for the line that starts as
" node[‘onbio’][‘apps’].each do |app|"
Thank you for your comments/thoughts