Class: VagrantPlugins::CommandAddress::Command
- Inherits:
-
Object
- Object
- VagrantPlugins::CommandAddress::Command
- Defined in:
- lib/command.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.synopsis ⇒ Object
6 7 8 |
# File 'lib/command.rb', line 6 def self.synopsis "outputs public IP address of a guest machine" end |
Instance Method Details
#execute ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/command.rb', line 10 def execute opts = OptionParser.new do |o| o. = "Usage: vagrant address [name]" end argv = (opts) return if !argv with_target_vms(argv, {:single_target=>true}) do |machine| ip = machine.provider.capability(:public_address) = ENV['TEAMCITY_VERSION'] ? "##teamcity[setParameter name='env.VAGRANT_ADDRESS' value='#{ip}']" : ip @env.ui.info() end end |