On Wed, Aug 15, 2012 at 5:03 PM, Calvin Walton wrote:
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.
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 stronglyOn Wed, Aug 15, 2012 at 2:58 PM, Douglas Garstang
Oops.Typo in paste.I actually used
$foo = inline_template("<%= [$pvdisks] %>.length")
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.
http://docs.puppetlabs.com/guides/templating.html.
Doug.
--
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.