On Mon, Jul 18, 2011 at 8:11 PM, Bob <[email protected]> wrote:
> I know it's a ugly hack, but this saved me:
>
> $myarray = ['1', '2', '3']
>
> $var0 = inline_template("<%=myarray.split(',')[0]%>")
> $var1 = inline_template("<%=myarray.split(',')[1]%>")
Should this be:
$var0 = inline_template("<%=myarray[0]%>")
If this type of feature is needed it can be provided via puppet
function. The examples here
https://github.com/puppetlabs/puppetlabs-functions can provide a jump
start for converting any quick hacks via inline_template to something
that's much more maintainable.
Thanks,
Nan
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.