vagrant-awsinfo 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,5 @@
1
+ # 0.0.1
2
+ * Initial Release
3
+
4
+ # 0.0.2
5
+ * Added some more data to the output, such as instanceid
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ gem "bundler"
2
+ gem "rake"
@@ -0,0 +1,10 @@
1
+ GEM
2
+ specs:
3
+ rake (10.0.4)
4
+
5
+ PLATFORMS
6
+ ruby
7
+
8
+ DEPENDENCIES
9
+ bundler
10
+ rake
data/README.md CHANGED
@@ -20,3 +20,15 @@ Examples:
20
20
  % vagrant awshost
21
21
  {"host":"ec2-1-2-3-4.compute-1.amazonaws.com","port":22,"private_key_path":"/Users/jdyer/.ssh/example.pem","username":"root"}
22
22
  ```
23
+
24
+ ## Contributing
25
+
26
+ 1. Fork it
27
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
28
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
29
+ 4. Push to the branch (`git push origin my-new-feature`)
30
+ 5. Create new Pull Request
31
+
32
+ ## Authors
33
+
34
+ John Dyer (johntdyer@gmail.com)
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -19,11 +19,27 @@ module VagrantAwsInfo
19
19
  end
20
20
  settings.machines = ["default"] if settings.machines.empty?
21
21
 
22
- with_target_vms(settings.machines) do |machine|
22
+ @env.ui.info get_info(settings.machines)
23
+
24
+ end
25
+
26
+ private
27
+
28
+ def get_info(machine)
29
+ with_target_vms(machine) do |machine|
23
30
  if machine.provider_name == :aws
24
- @env.ui.info machine.provider.ssh_info.to_json
31
+ ssh_info = machine.provider.ssh_info
32
+ r = {
33
+ host: ssh_info[:host],
34
+ ssh_port: ssh_info[:port],
35
+ username: ssh_info[:username],
36
+ instance_id: machine.id,
37
+ state: machine.provider.state.short_description,
38
+ }
39
+ return r
40
+
25
41
  else
26
- @env.ui.error "Sorry this plugin currently only supports the AWS provider"
42
+ return "Sorry this plugin currently only supports the AWS provider"
27
43
  end
28
44
  end
29
45
  end
@@ -1,3 +1,3 @@
1
1
  module VagrantAwsInfo
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-awsinfo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -19,7 +19,11 @@ extensions: []
19
19
  extra_rdoc_files: []
20
20
  files:
21
21
  - .gitignore
22
+ - CHANGELOG.md
23
+ - Gemfile
24
+ - Gemfile.lock
22
25
  - README.md
26
+ - Rakefile
23
27
  - lib/vagrant-awsinfo.rb
24
28
  - lib/vagrant-awsinfo/command.rb
25
29
  - lib/vagrant-awsinfo/plugin.rb