----- Original Message -----
> From: "Bruce" <[email protected]>
> To: [email protected]
> Sent: Thursday, March 7, 2013 8:16:26 PM
> Subject: Re: [Puppet Users] Re: Dynamic scoping deprecated - for defines also?
> 
> 
> 
> That doesn't sound like a description of dynamic scoping.  Best to show
> > examples
> >
> 
> Sure thing.
> 
> class foo {
>   define add_foo ( $foo_name ) {
>     file { '/etc/some/file':   content => template("foo/file.erb")
>   }
> }
> 
> Then in file.erb:
> 
> <%= scope.lookupvar('foo::add_foo::foo_name') %>

just do <%= @foo_name %> the vars in the define is local scope, just use them

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to