I have an attribute (node[‘name’]), which value is calculated during execution time (in a ruby_block).
I have another ruby_block which uses the value of the calculated attribute.
I can’t figure out the correct syntax for the second block. I know I need to use the lazy key word.
Here is what I have:
ruby_block “do something” do
block do
require 'mixlib/shellout’
command = "git config xxxx #{node[‘name’]}"
Mixlib::ShellOut.new(command)
curl.run_command
end
end