Re: [Puppet Users] erb tempate issue

2014-09-02 Thread Wil Cooley
On Sep 1, 2014 3:35 AM, "Juan Sierra Pons" wrote: > > Hi > > Finally I have changed to another kind on loop that works for my case > > uri<% @ldap_servers.each do |server| -%> > ldap://<%= server -%> > <% end %> As you've found, an explicit loop, er, iterable is better than trying to use implici

Re: [Puppet Users] erb tempate issue

2014-09-01 Thread Juan Sierra Pons
Hi Finally I have changed to another kind on loop that works for my case uri<% @ldap_servers.each do |server| -%> ldap://<%= server -%> <% end %> Thank you for your time Best regards -- Juan Sierra Pons

Re: [Puppet Users] erb tempate issue

2014-09-01 Thread Martin Alfke
Remove the space after uri and add the space in front of ldap://... On 01 Sep 2014, at 11:53, Juan Sierra Pons wrote: >> >> Just add a space in front of ldap://<%= >> > > > Hi > > I have tried this before but I get and extra espace between uri and ldap > > uri ldap://http://10.10.10.

Re: [Puppet Users] erb tempate issue

2014-09-01 Thread Juan Sierra Pons
> > Just add a space in front of ldap://<%= > Hi I have tried this before but I get and extra espace between uri and ldap uri ldap://http://10.10.10.1http://10.10.10.2http://10.10.10.2 Thank you for your time ---

Re: [Puppet Users] erb tempate issue

2014-09-01 Thread Martin Alfke
Hi. On 01 Sep 2014, at 11:46, Juan Sierra Pons wrote: > Hi > > I am creating a module to populate a file. The result should be like this: > > uri ldap://10.10.10.1 ldap://10.10.10.2 ldap://10.10.10.3 > > To achieve this I am using an array with the IPs declared on the > ldap_servers array and

[Puppet Users] erb tempate issue

2014-09-01 Thread Juan Sierra Pons
Hi I am creating a module to populate a file. The result should be like this: uri ldap://10.10.10.1 ldap://10.10.10.2 ldap://10.10.10.3 To achieve this I am using an array with the IPs declared on the ldap_servers array and the following erb template: uri <% if !@ldap_servers.empty? -%> ldap://