| Puppet Version: 7.23.0 The following EPP template:
# any content |
<% ([1, 2, 3] + [7, 8, 9]).each |$x| { -%> |
<%= $x %> |
<% } -%>
|
fails validation with:
$ puppet epp validate test.pp |
Error: Ambiguous EPP parameter expression. Probably missing '<%-' before parameters to remove leading whitespace (file: test.pp, line: 1, column: 1)
|
Even with a parameter tag present (i.e. <%- || -%> prepended to the file), validation still fails with the same error. I would expect the template to pass validation (both with and without a parameter tag). As far as I can tell the parenthesized expression is what triggers it. Here's a more minimal (but less realistic) example, which I would expect to fail validation with "This Parenthesized Expression has no effect", but that fails with "Ambiguous EPP parameter expression":
While writing this report, I also found that having two of these (parenthesized).each constructs in sequence:
<% ([1, 2, 3] + [7, 8, 9]).each |$x| { -%> |
<%= $x %> |
<% } -%> |
<% ([1, 2, 3] + [7, 8, 9]).each |$x| { -%> |
<%= $x %> |
<% } -%>
|
fails with a different validation error:
$ puppet epp validate test2.epp |
Error: Illegal expression. A Method call is unacceptable as function name in a Function Call (file: test2.epp, line: 1, column: 27)
|
while I would expect validation to pass. |