X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fssl%2Ftemplates%2Fkey-chained.erb;h=75b34283f1a17b109bb5d7d0f1afe24a586a23df;hb=cb2e9607cf2092ee657889e2eaee4224eadd7bfe;hp=2fbace05a6bf1e778e451438a174712ba5ef2468;hpb=e19d06b00d9fecd4c1263bd487486ade0b6b6d90;p=mirror%2Fdsa-puppet.git diff --git a/modules/ssl/templates/key-chained.erb b/modules/ssl/templates/key-chained.erb index 2fbace05a..75b34283f 100644 --- a/modules/ssl/templates/key-chained.erb +++ b/modules/ssl/templates/key-chained.erb @@ -1,24 +1,24 @@ <%= out = "" - fn = "/etc/puppet/modules/ssl/files/keys/#{name}.crt" + fn = "/etc/puppet/modules/ssl/files/keys/#{@name}.crt" if File.exist?(fn) then out = File.read(fn) else - fn = "/etc/puppet/modules/ssl/files/from-letsencrypt/#{name}.key" + fn = "/etc/puppet/modules/ssl/files/from-letsencrypt/#{@name}.key" out = File.read(fn) end out %> <%= 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" + 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