lib/kontena/machine/packet/master_provisioner.rb in kontena-plugin-packet-0.2.3 vs lib/kontena/machine/packet/master_provisioner.rb in kontena-plugin-packet-0.2.4

- old
+ new

@@ -31,10 +31,14 @@ spinner "Generating a self-signed SSL certificate" do ssl_cert = generate_self_signed_cert end end + if respond_to?(:certificate_public_key) && !opts[:ssl_cert] + ssl_cert_public = certificate_public_key(ssl_cert) + end + name = generate_name userdata_vars = opts.merge( ssl_cert: ssl_cert, server_name: name.sub('kontena-master-', '') @@ -82,9 +86,10 @@ { name: name.sub('kontena-master-', ''), public_ip: public_ip['address'], code: opts[:initial_admin_code], provider: 'packet', + ssl_certificate: ssl_cert_public, version: master_version } end def generate_name