title: How to Run for each loop in template chef
body: <p>I have a attribute in the form of array, and i want to iterate over it in Chef template ?</p>
  
  <pre><code>&lt;% node['db2']['instance_username'].each do |device| -%&gt; 
    &lt;%= "/home/#{device}/sqllib/lib64" %&gt;
  &lt;% end -%&gt;
  </code></pre>
  
  <p>I'm doing like this but it is giving error.</p>