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
Please follow this link http://lists.opscode.com/sympa/arc/chef/2015-03/msg00266.html you can use node.run_state[:variables] for parsing one variable to another recipe
Here is my code :: file.rb
node.run_state[:script_1] = "foo" include_recipe 'provision::copy'
and in other copy.rb file put following code ::
copy.rb
filename = node.run_state[:script_1] puts "Name is #{filename}"