X-Git-Url: https://git.donarmstrong.com/?p=dsa-puppet.git;a=blobdiff_plain;f=modules%2Fpuppetmaster%2Flib%2Fpuppet%2Fparser%2Ffunctions%2Fgen_tlsa_entry.rb;h=baaa73b4dfcd59c08d54597a9ba0d73fe0bc180f;hp=53a4922bd23594bba28d9879b10e1c97703a2543;hb=d32b5ca2040af0e861851c5519aa5ff5b7887768;hpb=4f61b8e70efe97667851c2db0034339a33ae1c06 diff --git a/modules/puppetmaster/lib/puppet/parser/functions/gen_tlsa_entry.rb b/modules/puppetmaster/lib/puppet/parser/functions/gen_tlsa_entry.rb index 53a4922b..baaa73b4 100644 --- a/modules/puppetmaster/lib/puppet/parser/functions/gen_tlsa_entry.rb +++ b/modules/puppetmaster/lib/puppet/parser/functions/gen_tlsa_entry.rb @@ -7,12 +7,12 @@ module Puppet::Parser::Functions if port.kind_of?(Array) ports = port else - ports = [ port ] + ports = [port] end res = [] - res << "; cert #{certfile} for #{hostname}:#{port}." - ports.each{ |port| + res << "; cert #{certfile} for #{hostname}:#{ports}." + ports.each do |port| cf = certfile if File.exist?(cf) cmd = ['swede', 'create', '--usage=3', '--selector=1', '--mtype=1', '--certificate', cf, '--port', port.to_s, hostname] @@ -29,7 +29,7 @@ module Puppet::Parser::Functions res << new_entry end end - } + end return res.join("\n") end