Issue #18024 has been updated by Peter Meier. Branch set to https://github.com/puppetlabs/puppet/pull/1538
PR @ https://github.com/puppetlabs/puppet/pull/1538 ---------------------------------------- Feature #18024: Make a shorthand alias for scope.lookupvar() https://projects.puppetlabs.com/issues/18024#change-87315 * Author: Yuri Arabadji * Status: Unreviewed * Priority: Normal * Assignee: * Category: * Target version: * Affected Puppet version: * Keywords: * Branch: https://github.com/puppetlabs/puppet/pull/1538 ---------------------------------------- Tired of writing scope.lookupvar() in my templates. Gepetto doesn't have working auto-completion, sadly, so I have to ask here for a solution. That function is the most used in templates, assuming you've got hierarchy of defines/classes and there's an "intermediary" class between the defined resource and template. <pre> class a { $thevar = 123 whatever { 'yy': tmpl => 'xx'} } define whatever($tmpl) { file { /xxx: content => template($tmpl) } } xx.erb: <%= scope.lookupvar('a::thevar') %> </pre> Maybe you could make a short alias for it, for ex.: "sl" or "slv". Thanks. -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" 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-bugs?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
