Example
rsyslog::conf { 'postfix': priority => 20, content => @(EOF), # Managed by Puppet # rsyslog.conf(5) config if ($programname startswith 'postfix') then { action(type="omfile" file="/var/log/postfix.log") } | EOF }
Output
# Managed by Puppet # rsyslog.conf(5) config if ($programname startswith 'postfix') then { action(type="omfile" file="/var/log/postfix.log") }
The extra newline after the first line is added due to this code:
# append a trailing newline if omitted $content_formatted = $content ? { undef => undef, default => regsubst($content, "\n?$", "\n") }
$ matches the end of a *line* without the newline, so the regsubst always matches the first line whether it has a trailing newline or not.