Class: VagrantPlugins::Proxmox::Action::ReadSSHInfo

Inherits:
ProxmoxAction
  • Object
show all
Defined in:
lib/vagrant-proxmox/action/read_ssh_info.rb

Instance Method Summary collapse

Constructor Details

#initialize(app, env) ⇒ ReadSSHInfo

Returns a new instance of ReadSSHInfo.



7
8
9
# File 'lib/vagrant-proxmox/action/read_ssh_info.rb', line 7

def initialize app, env
	@app = app
end

Instance Method Details

#call(env) ⇒ Object



11
12
13
14
15
16
# File 'lib/vagrant-proxmox/action/read_ssh_info.rb', line 11

def call env
	env[:machine_ssh_info] = get_machine_ip_address(env).try do |ip_address|
		{host: ip_address, port: env[:machine].config.ssh.guest_port}
	end
	next_action env
end