[colug-432] ERB variable expansion

Scott Merrill skippy at skippy.net
Mon Oct 19 17:55:16 EDT 2015


On Oct 19, 2015 5:50 PM, Rick Hornsby <richardjhornsby at gmail.com> wrote:
>

> I have this: 
>
> <% 
> @memberList = "" 
> @groups.each do |group| 
> @memberList += "(memberOf=cn=${group},cn=Users,dc=foo,dc=com)" 
> end 
> -%> 
>

I think you want #{} for variable expansion inside your quoted string, and not ${}.

What you're trying to do is the recommended way. Looping inside Puppet manifests is not supported unless you use the "future" parser (enabled by default in newer Puppet versions).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.colug.net/pipermail/colug-432/attachments/20151019/24c113d2/attachment.html 


More information about the colug-432 mailing list