I am trying to change an attribute in one resource and want to use updated value in another resource but updated value is not getting reflected in another resources. please help me
Code
node[:oracle][:asm][:disks].each_key do |disk|
Chef::Log.info("I am in #{cookbook_name}::#{recipe_name} and current disk count #{node[:oracle][:asm][:test]}")
bash "beforeTest" do
code <<-EOH
echo #{node[:oracle][:asm][:test]}
EOH
end
ruby_block "test current disk count" do
block do
node.set[:oracle][:asm][:test] = "#{node[:oracle][:asm][:test]}".to_i+1
end
end
bash "test" do
code <<-EOH
echo #{node[:oracle][:asm][:test]}
EOH
end
end
The value I'm trying to update is the one stored at node[:oracle][:asm][:test]