Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/154026
Change subject: apache::conf: append trailing newline if missing ...................................................................... apache::conf: append trailing newline if missing If $content is not undefined, make sure it ends with a trailing newline. Change-Id: I863e2f9ed684c1d7e98c74c84db23d7ce066a404 --- M modules/apache/manifests/conf.pp 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/26/154026/1 diff --git a/modules/apache/manifests/conf.pp b/modules/apache/manifests/conf.pp index 3118c33..0b5aab9 100644 --- a/modules/apache/manifests/conf.pp +++ b/modules/apache/manifests/conf.pp @@ -61,10 +61,14 @@ $title_safe = regsubst($title, '[\W_]', '-', 'G') $file_ext = $conf_type ? { env => 'sh', default => 'conf' } $conf_file = sprintf('%02d-%s.%s', $priority, $title_safe, $file_ext) + $content_formatted = $content ? { + undef => undef, + default => regsubst($content, "\n?$", "\n"), + } file { "/etc/apache2/${conf_type}-available/${conf_file}": ensure => $ensure, - content => $content, + content => $content_formatted, source => $source, owner => 'root', group => 'root', -- To view, visit https://gerrit.wikimedia.org/r/154026 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I863e2f9ed684c1d7e98c74c84db23d7ce066a404 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh <o...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits