Sha256: 6ffccdcf6f70ea90c26f155d6d6caec126cb1e3b66b3634466eea1b95d48f778
Contents?: true
Size: 649 Bytes
Versions: 12
Compression:
Stored size: 649 Bytes
Contents
module Fog module Compute class RackspaceV2 class Server def setup(credentials = {}) requires :ssh_ip_address, :identity, :public_key, :username commands = [ %{mkdir .ssh}, %{echo "#{public_key}" >> ~/.ssh/authorized_keys}, password_lock, %{echo "#{Fog::JSON.encode(attributes)}" >> ~/attributes.json}, %{echo "#{Fog::JSON.encode(metadata)}" >> ~/metadata.json} ] commands.compact @password = nil if password_lock Fog::SSH.new(ssh_ip_address, username, credentials).run(commands) rescue Errno::ECONNREFUSED, Net::SSH::Disconnect sleep(1) retry end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems