On Wed, 2012-08-15 at 14:59 -0700, Douglas Garstang wrote:
> On Wed, Aug 15, 2012 at 2:58 PM, Douglas Garstang
> Oops.Typo in paste.I actually used
> 
> $foo = inline_template("<%= [$pvdisks] %>.length")

You seem to be misunderstanding how erb templates work; I strongly
recommend that you go and re-read the docs. The syntax to use would look
like this:
  $foo = inline_template("<%= @pvdisks.length %>")
if the variable is local (in the same class/define), or
  $foo = inline_template("<%= scope.lookupvar('scope::varname').length %>")
if it's from somewhere else.

Remember: everything between <% and %> in the template is interpreted as
ruby code. Everything outside is passed through as text to the output.

-- 
Calvin Walton <calvin.wal...@kepstin.ca>

-- 
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.

Reply via email to