Module: VagrantPlugins::ManagedServers::Cap
- Defined in:
- lib/vagrant-managed-servers/cap.rb
Class Method Summary collapse
-
.public_address(machine) ⇒ String
Returns guest’s IP address that can be used to access the VM from the host machine.
Class Method Details
.public_address(machine) ⇒ String
Returns guest’s IP address that can be used to access the VM from the host machine.
8 9 10 11 12 13 14 |
# File 'lib/vagrant-managed-servers/cap.rb', line 8 def self.public_address(machine) return nil if machine.state.id != :running ssh_info = machine.ssh_info return nil if !ssh_info ssh_info[:host] end |