Script output to the recipe variable


#1

Hello.

Is there any possibility to assign script output to a variable, which can be used later in recipe?

Something like that:

my_var = script “foo” do
interpreter "bash"
user "root"
code <<-EOH
echo "foo"
EOH
end

if myvar == “foo”

Thank you.


#2

On Sunday, July 7, 2013 at 7:29 AM, Daniil S wrote:

Hello.

Is there any possibility to assign script output to a variable, which can be used later in recipe?

Something like that:

my_var = script “foo” do
interpreter "bash"
user "root"
code <<-EOH
echo "foo"
EOH
end

if myvar == “foo”

Thank you.

What exactly are you trying to accomplish?


Daniel DeLeo