vagrant-goodhosts 1.1.4 → 1.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/default.yml +1 -1
- data/.rubocop.yml +2 -0
- data/lib/vagrant-goodhosts/GoodHosts.rb +11 -21
- data/lib/vagrant-goodhosts/plugin.rb +3 -3
- data/lib/vagrant-goodhosts/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a67d1220aa24b9f5d083e7720fe47e81412f9708d2113e4d760f4ef8aecb1e0
|
4
|
+
data.tar.gz: 16cf533b3ab5ca06ab80f53e1636ae30e6b3cf523433351ab06c884be44a0469
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '039f6ce56af70442af5098abebea8825c403287fe26a357007ee63f6b7ca5d9f380049f5dad650984f0d6b41cab8836cfed3f23470d6fdc1ce0f1e3a86dc41b4'
|
7
|
+
data.tar.gz: cf5c87c71bcfd50f49030e6b7ab5553c200e4df4374d83531dafb8369907d1eec0fa9f498f4d71d208f262b19a45288315f365361e6f7f69615c9539c0ba3a1c
|
data/.rubocop.yml
CHANGED
@@ -10,12 +10,14 @@ module VagrantPlugins
|
|
10
10
|
module GoodHosts
|
11
11
|
def get_ips
|
12
12
|
ips = []
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
if @machine.provider_name == :docker
|
14
|
+
@ui.info '[vagrant-goodhosts] Docker detected, adding 127.0.0.1 and ::1 IP addresses'
|
15
|
+
ip = "127.0.0.1"
|
16
|
+
ips.push(ip) unless ip.nil? or ips.include? ip
|
17
|
+
ip = "::1"
|
18
|
+
ips.push(ip) unless ip.nil? or ips.include? ip
|
16
19
|
return ips
|
17
20
|
end
|
18
|
-
|
19
21
|
@machine.config.vm.networks.each do |network|
|
20
22
|
key, options = network[0], network[1]
|
21
23
|
if options[:goodhosts] == "skip"
|
@@ -23,23 +25,11 @@ module VagrantPlugins
|
|
23
25
|
end
|
24
26
|
ip = options[:ip] if (key == :private_network || key == :public_network) && options[:goodhosts] != "skip"
|
25
27
|
ips.push(ip) if ip
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
options = {
|
33
|
-
vmm_server_address: @machine.provider_config.vmm_server_address,
|
34
|
-
proxy_server_address: @machine.provider_config.proxy_server_address,
|
35
|
-
timeout: timeout,
|
36
|
-
machine: @machine
|
37
|
-
}
|
38
|
-
network = @machine.provider.driver.read_guest_ip(options)
|
39
|
-
if network["ip"]
|
40
|
-
ips.push(network["ip"]) unless ips.include? network["ip"]
|
41
|
-
end
|
42
|
-
end
|
28
|
+
end
|
29
|
+
if @machine.provider_name == :hyperv
|
30
|
+
ip = @machine.provider.driver.read_guest_ip["ip"]
|
31
|
+
@ui.info "[vagrant-goodhosts] Read guest IP #{ip} from Hyper-V provider"
|
32
|
+
ips.push(ip) unless ip.nil? or ips.include? ip
|
43
33
|
end
|
44
34
|
return ips
|
45
35
|
end
|
@@ -31,15 +31,15 @@ module VagrantPlugins
|
|
31
31
|
end
|
32
32
|
|
33
33
|
action_hook(:goodhosts, :machine_action_halt) do |hook|
|
34
|
-
hook.
|
34
|
+
hook.prepend(Action::RemoveHosts)
|
35
35
|
end
|
36
36
|
|
37
37
|
action_hook(:goodhosts, :machine_action_suspend) do |hook|
|
38
|
-
hook.
|
38
|
+
hook.prepend(Action::RemoveHosts)
|
39
39
|
end
|
40
40
|
|
41
41
|
action_hook(:goodhosts, :machine_action_destroy) do |hook|
|
42
|
-
hook.
|
42
|
+
hook.prepend(Action::RemoveHosts)
|
43
43
|
end
|
44
44
|
|
45
45
|
action_hook(:goodhosts, :machine_action_reload) do |hook|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-goodhosts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniele Scasciafratte
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-06-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
100
|
- !ruby/object:Gem::Version
|
101
101
|
version: '0'
|
102
102
|
requirements: []
|
103
|
-
rubygems_version: 3.3.
|
103
|
+
rubygems_version: 3.3.15
|
104
104
|
signing_key:
|
105
105
|
specification_version: 4
|
106
106
|
summary: Enables Vagrant to update hosts file on the host machine with goodhosts
|