Add ~/.credentials-manual.yaml to salsa
[mirror/dsa-puppet.git] / modules / ssl / templates / chained.erb
index 99572b7..737b9f5 100644 (file)
@@ -1,13 +1,13 @@
 <%=
   out = ""
-  fn = "/etc/puppet/modules/ssl/files/servicecerts/#{name}.crt"
+  fn = "/etc/puppet/modules/ssl/files/servicecerts/#{@name}.crt"
   if File.exist?(fn) then
     out = File.read(fn)
 
-    chain = "/etc/puppet/modules/ssl/files/chains/#{name}.crt"
-    out += File.exist?(chain) ? File.read(chain) : ''
+    chain = "/etc/puppet/modules/ssl/files/chains/#{@name}.crt"
+    out += File.exist?(chain) ? ("\n" + File.read(chain)) : ''
   else
-    fn = "/etc/puppet/modules/ssl/files/from-letsencrypt/#{name}.crt-chained"
+    fn = "/etc/puppet/modules/ssl/files/from-letsencrypt/#{@name}.crt-chained"
     out = File.read(fn)
   end
   out