Unless you want to establish a proper data structure (array of pairs), I'd suggest Array#zip:
http://www.ruby-doc.org/core-1.9.3/Array.html#method-i-zip Best Regards, D. On 27.07.2012 10:12, Jiří Červenka wrote:
Hi, I am stuck on this task. I need to generate a file with this content: ... /bin/mount --bind /home/some/path/ /home/someuser/www /bin/mount --bind /home/comple/tely/different/path/ /home/differentuser/www /bin/mount --bind /home/another/path/ /home/anotheruser/www . . ... For each row I need to insert two variables. I am able to construct simple loop in erb file, but this does not solve my problem: <% userss.each do |user| -%> /bin/mount --bind /some/path/<%= user %> /home/somepath/<%= user %> <% end -%> I need loop, whose content looks like this: /bin/mount --bind /some/path/<%= path %> /home/somepath/<%= user %> Can someone point me in right direction? Thanks. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/AyvMd9vq4EAJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.