diff --git a/.gitignore b/.gitignore index c433cde..a18ca26 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,5 @@ tmp *.o *.a mkmf.log +Vagrantfile +.vagrant/ diff --git a/Gemfile b/Gemfile index 7fda0d6..078b116 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,5 @@ source 'https://rubygems.org' -gemspec - group :development do gem 'vagrant', git: 'https://github.com/mitchellh/vagrant.git' end diff --git a/lib/command.rb b/lib/command.rb index 2b6038b..fa03493 100644 --- a/lib/command.rb +++ b/lib/command.rb @@ -1,8 +1,14 @@ module VagrantPlugins module GuestIP class Command < Vagrant.plugin(2, :command) + def self.synopsis + 'outputs IP address of a guest machine' + end + def execute - puts "Hello!" + with_target_vms(nil, {:single_target=>true}) do |machine| + puts machine.guest.capability(:read_ip_address) + end end end end