title: Chef - Source / Refresh environment variables session and make them persistent
body: <p>In a Chef recipe, I need to source a file which sets many environment variables in the node.
  Then from the same recipe, another action (package) is run which depends of those other environment variables.
  I tried the following but the source action is not persistent so the package action fails requesting missing environment variables.</p>
  
  <pre><code>bash "Sourcing ENV Variables" do
    code "source /etc/profile.d/set_env.sh"
  end
  
  package "my-package" do
    action :install
  end
  </code></pre>
  
  <p>How can I source persistently a file, or refresh the user session so it takes the profile updates (/etc/profile.d/set_env.sh) ?</p>
  
  <p>Thanks for the help.</p>