I\'m using chef-cookbook-hostname cookbook to setup node\'s hostname. I don\'t want my hostname to be hard coded in the attribute file (default[\'set_fqdn\']).
In
I used node.run_state['variable'] for the same purpose and was successfully able to do it. Please find basic sample code below.
ruby_block "resource_name" do
block do
node.run_state['port_value'] = 1432
end
end
ruby_block "resource_name2" do
block do
num = node.run_state['variable']
end
end
I hope it will help.