Append chain if exists
[mirror/dsa-puppet.git] / modules / ssl / templates / chained.erb
index 99572b7..778a5b8 100644 (file)
@@ -5,7 +5,7 @@
     out = File.read(fn)
 
     chain = "/etc/puppet/modules/ssl/files/chains/#{name}.crt"
-    out += File.exist?(chain) ? File.read(chain) : ''
+    out += File.exist?(chain) ? ("\n" + File.read(chain)) : ''
   else
     fn = "/etc/puppet/modules/ssl/files/from-letsencrypt/#{name}.crt-chained"
     out = File.read(fn)