- From: "Mark H. Nichols" <
>
- To:
- Subject: [chef] Re: Run as root or as vagrant user
- Date: Wed, 15 May 2013 07:54:33 -0500
On May 14, 2013, at 3:26 PM, AJ Christensen
<
>
wrote:
>
You've got the environment parameters in the bash script itself.
>
>
The environment parameter is a parameter to the EXECUTE and SCRIPT
>
resources e.g.
>
>
bash "script with env vars" do
>
environment( "SOME_KEY" => "SOME_VALUE", "ANOTHER_KEY" => "ANOTHER_VALUE" )
>
code <<-EOH
>
echo 'Env dump'
>
env
>
echo 'Env dumped'
>
env SOME_KEY
>
env ANOTHER_KEY
>
echo 'specific keys dumped'
>
EOH
>
end
That did the trick. Thank you.
>
>
As for whether Maven will honor this, I don't know, but it's trivial
>
to test that Chef can pass environment variables into a new process --
>
and this definitely does work.
It appears Maven did honor the environment settings.
Thanks again,
Mark
Archive powered by MHonArc 2.6.16.