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

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

Overview

This action stores the ssh information in env

Instance Method Summary collapse

Constructor Details

#initialize(app, env) ⇒ ReadSSHInfo

Returns a new instance of ReadSSHInfo.



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

def initialize app, env
	@app = app
end

Instance Method Details

#call(env) ⇒ Object



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

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