[Puppet Users] Simply Auto Increment A Number

Brian Carpio
Tue, 29 May 2012 18:11:21 -0000

Hi,

I have a template which looks like this

<% scope.lookupvar(''openldap::params::ldapservers'').each do
|var| -%>
olcSyncrepl: {0}rid=001 provider="ldap://<%= var %>:389"
type=refreshAndPer
 sist retry="5 5 300 +"
searchbase="<%scope.lookupvar(''openldap::params::searchbase'')
%>" attrs="*,+"
bindmeth
 od=simple binddn="cn=<%=
scope.lookupvar(''openldap::params::binddn'')
%>" credentials="<%=
scope.lookupvar(''openldap::params::secret'') %>"
<% end -%>


I want to auto increment the {0}rid=001 for each iteration of the
loop. Is there an easy way to do this with out creating a hash map?



Thanks,
Brian Carpio

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at