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.walton@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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 8 of 10 | next ›
Discussion Overview
grouppuppet-users @
postedAug 15, '12 at 9:51p
activeAug 16, '12 at 4:59a



site design / logo © 2022 Grokbase