title: how to use user defined environment variables in chef
body: <p>I am trying to use a user defined variable in my template resource path as below. But I am not sure how to retrieve the user defined environment variable in chef. Please help.</p>
  
  <pre><code>template "#{user_env_variable}/sys/test.xml" do  
    source "test.xml.erb"  
    owner user1  
    group user1  
    mode '0644'  
  end  
  </code></pre>
  
  <p><code>user_env_variable</code> is the user defined environment variable in <code>.bashrc</code>.</p>