hi everyone,
i was wondering if variable passed as parameter to resource can be made to be
elevated at execute phase instead of compile phase. I have the following code
example.
ruby_block "Calculate secret" do
block do
node.set['secret_message'] = "This is a secret"
end
end
file "/tmp/test" do
content "#{node['secret_message']}"
mode 0644
end
This is a simplified version of the challenge i have, what i want is for the
file resource to use a variable node['secret_message'] which is computed by the
ruby_block resource. but the end result is the file /tmp/test contains nothing
because #{node['secret_message']} being ruby code is elevated before the
ruby_block resource is run.
Does anyone know a solution? if there is a blog post somewhere let me know.
Thanks
Archive powered by MHonArc 2.6.16.