vagrant-ip-show 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +38 -0
- data/lib/vagrant-ip-show/command.rb +15 -15
- data/lib/vagrant-ip-show/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4dc8bf0aedf09a3769ce1310deaa231e43579c3d
|
4
|
+
data.tar.gz: 53951963543c3c9a8240b77f4ca9f8c6d8f379fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 310077d1ec61387d5a5f4875dac49dae1dbb718fdec42077eef14bb9c0c4579aec7a309b88d59d660be91e4f0508b86bb480c6c821caaddc8ad10180ed124d6b
|
7
|
+
data.tar.gz: 206d55258de234926a6fb31f8d15c707d6b586a86743878cdefff019fc2b14b58d138e936279e8b8eb83fdfca589cb6297733a5340772f125c4594553c1cd8fb
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
# Change Log
|
2
|
+
All notable changes to this project will be documented in this file.
|
3
|
+
This project adheres to [Semantic Versioning](http://semver.org/).
|
4
|
+
|
5
|
+
## [Unreleased]
|
6
|
+
|
7
|
+
## [0.0.4] - 2016-05-07
|
8
|
+
### Added
|
9
|
+
- Create a CHANGELOG.md
|
10
|
+
|
11
|
+
### Fixed
|
12
|
+
- [GH#5] - Make plugin works for Red Hat like boxes (using ip instead of
|
13
|
+
ifconfig) - thanks @ricardson
|
14
|
+
|
15
|
+
### Devs
|
16
|
+
- [GH#4] - Correct indentation in command.rb - thanks @schlueter
|
17
|
+
|
18
|
+
## [0.0.3] - 2015-12-09
|
19
|
+
### Fixed
|
20
|
+
- [GH#2], [GH#3] - Make plugin work in multivm environment - thanks @mightydok
|
21
|
+
|
22
|
+
## [0.0.2] - 2015-11-03
|
23
|
+
### Fixed
|
24
|
+
- [GH#1] - Make plugin works for Debian like boxes (before just Ubuntu) - thanks
|
25
|
+
@mightydok
|
26
|
+
|
27
|
+
## 0.0.1 - 2015-10-07
|
28
|
+
### Added
|
29
|
+
- First version
|
30
|
+
|
31
|
+
[Unreleased]: https://github.com/rogeriopradoj/vagrant-ip-show/compare/v0.0.3...HEAD
|
32
|
+
[0.0.3]: https://github.com/rogeriopradoj/vagrant-ip-show/compare/v0.0.2...v0.0.3
|
33
|
+
[0.0.2]: https://github.com/rogeriopradoj/vagrant-ip-show/compare/v0.0.1...v0.0.2
|
34
|
+
[GH#5]: https://github.com/rogeriopradoj/vagrant-ip-show/issues/5
|
35
|
+
[GH#4]: https://github.com/rogeriopradoj/vagrant-ip-show/issues/4
|
36
|
+
[GH#3]: https://github.com/rogeriopradoj/vagrant-ip-show/issues/3
|
37
|
+
[GH#2]: https://github.com/rogeriopradoj/vagrant-ip-show/issues/2
|
38
|
+
[GH#1]: https://github.com/rogeriopradoj/vagrant-ip-show/issues/1
|
@@ -2,28 +2,28 @@
|
|
2
2
|
module Vagrant
|
3
3
|
module IpShow
|
4
4
|
class Command < Vagrant.plugin('2', :command)
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
def self.synopsis
|
6
|
+
"show all VM ip addresses"
|
7
|
+
end
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
9
|
+
def execute
|
10
|
+
options = {}
|
11
|
+
opts = OptionParser.new do |o|
|
12
|
+
o.banner = "Usage: vagrant ip-show [vmname]"
|
13
|
+
o.separator ""
|
14
|
+
o.separator "Options:"
|
15
|
+
o.separator ""
|
16
|
+
end
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
18
|
+
# Parse the options and return if we don't have any target.
|
19
|
+
argv = parse_options(opts)
|
20
|
+
return if !argv
|
21
21
|
|
22
22
|
# Execute the actual SSH
|
23
23
|
with_target_vms(argv, single_target: true) do |vm|
|
24
24
|
@logger.info("Getting ips of vm networks")
|
25
25
|
ssh_opts = {extra_args: ['-q']} # make it quiet
|
26
|
-
env = vm.action(:ssh_run, ssh_run_command: "
|
26
|
+
env = vm.action(:ssh_run, ssh_run_command: "ip a | grep 'inet ' | awk '{ print $2}' | grep -v 127.0.0.1 | cut -d/ -f1", ssh_opts: ssh_opts)
|
27
27
|
status = env[:ssh_run_exit_status] || 0
|
28
28
|
return status
|
29
29
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-ip-show
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rogerio Prado de Jesus
|
@@ -17,6 +17,7 @@ extensions: []
|
|
17
17
|
extra_rdoc_files: []
|
18
18
|
files:
|
19
19
|
- ".gitignore"
|
20
|
+
- CHANGELOG.md
|
20
21
|
- Gemfile
|
21
22
|
- LICENSE
|
22
23
|
- README.md
|