Class: VagrantPlugins::Memset::Action::ReadSSHInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-memset/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-memset/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
17
18
19
20
21
22
# File 'lib/vagrant-memset/action/read_ssh_info.rb', line 11

def call(env)

  return "not created" if env[:machine].id.nil?
  print env[:machine].id
  env[:machine_ssh_info] = {
    :host => "#{env[:machine].id}.miniserver.com",
    :port => 22,
    :username => "root"
  }
  
  @app.call(env)
end