FAQ

On Wed, Aug 15, 2012 at 5:03 PM, Calvin Walton wrote:
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.
The '@' character does not appear anywhere on the page
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.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

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

People

Translate

site design / logo © 2022 Grokbase