The following prints a confusing error message in 4.10.5 and up:
$ bundle exec puppet apply -e "notice(inline_template('<%= tags %>'))" |
Error: Evaluation Error: Error while evaluating a Function Call, Failed to parse inline template: undefined method `tags' for Scope(Class[main]):Puppet::Parser::Scope (line: 1, column: 8) on node localhost
|
Within the body of the ERB template, self is TemplateWrapper and TemplateWrapper#tags is a valid method that delegates to the Scope, but that doesn't forward it to the parser resource, due to https://github.com/puppetlabs/puppet/commit/02576c98fa5a8b7decb7b53c9407bf8523947220#diff-b929053e73f66fa12eac30a6222276489f6ea778ec407f99183a03e763b38623 We should either remove the tags method from TemplateWrapper or raise a more meaningful error (to call all_tags instead) /cc Ben Ford, David Schmitt |