Affects Version/s: PUP 4.1.0
I'm on Ubuntu Trusty (updated). I have followed the documentation for the installation of Puppet 4 server.
Release Notes:Bug Fix
I have just tried the epp() function in a basic module with this code:
Here is my embedded puppet template foo.epp:
After a puppet run (directly on my puppet server), here is the content of the /tmp/a file:
I have 2 lines which should be indented but this not the case.
Rq: if I remove the first line of the template (ie the declaration of the template's parameter), the indentation is correct.
This was caused by several factors; the specification was vague and the implementation was not correct. This led to the problem reported here (loosing expected indentation). In general the trimming operations removed too much whitespace (on lines it should not touch). The specification has been updated with clearer rules. Basically:
- A right trim tags trims trailing whitepace at most up to and including a line break on the same line as the end (right trimming) tag
- A left trim tag trims leading whitepsace at most up to, but not including a line break on the same line as the opening (left trimming) tag
- A comment tag is always left trimming
The fix for this ticket (problem with indentation) makes the implementation compliant with the specification.