title: Chef recipe use ubuntu environmental variables
body: <p>I have a chef recipe which I am looking to utilize the ubuntu environment variables from the system:</p>
  
  <pre><code>bash "proj s3 sync" do
    code "AWS_ACCESS_KEY_ID=#{ENV['AWS_ACCESS_ID']} AWS_SECRET_ACCESS_KEY=#{ENV['AWS_SECRET']} aws command..."
    cwd     "/home/#{node['deploy']['chef-environment']}"
    user    "#{node['deploy']['chef-environment']}"
    environment ({
      'HOME' =&gt; ::Dir.home(node['deploy']['chef-environment']),
      'USER' =&gt; node['deploy']['chef-environment'],
    })
    ignore_failure false
  end
  </code></pre>
  
  <p>When executing this recipe, the env vars are empty. But from the same machine, doing EG <code>echo $AWS_ACCESS_ID</code> returns result as expected.</p>
  
  <p>Is there something wrong with my use of the ruby ENV syntax in this chef recipe? Or another reason the scope of ENV would not possess the properties needed?</p>