Sha256: 408fafc9126bba2ce0da92ce9d0763e967ae03e86c6b13a7a25473012f7e2f95
Contents?: true
Size: 457 Bytes
Versions: 44
Compression:
Stored size: 457 Bytes
Contents
#!/usr/local/ruby-current/bin/ruby require "openssl" require 'net/ssh' key = OpenSSL::PKey::RSA.new 2048 public_key = "#{key.public_key.ssh_type} #{[key.public_key.to_blob].pack('m0')}" vault_opts="--mode client -u mu -F json" vault_cmd = "knife vault create jenkins admin '{ \"public_key\":\"#{public_key}\", \"private_key\":\"#{key.to_pem.chomp!.gsub(/\n/, "\\n")}\", \"username\": \"master_user\" }' #{vault_opts} --search name:MU-MASTER" exec vault_cmd
Version data entries
44 entries across 44 versions & 1 rubygems