From: Peter Palfrader Date: Sat, 18 Mar 2017 20:39:21 +0000 (+0000) Subject: fix two templates X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=d8a52fe556442959340377f0849415412231c138;p=mirror%2Fdsa-puppet.git fix two templates --- diff --git a/modules/ssl/templates/chained.erb b/modules/ssl/templates/chained.erb index 778a5b817..737b9f5a9 100644 --- a/modules/ssl/templates/chained.erb +++ b/modules/ssl/templates/chained.erb @@ -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" + 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 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