vagrant-multi-hostsupdater 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 042e73996833864688293c13c9d8831f2d770159
|
4
|
+
data.tar.gz: 9850c015e26e09bbd4589c707de3678f5fc7efcb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eab1462f5ee20a44a382eaf3a758562d0c5c01267da451a9b8e6799cf7d760bfb57d6829e169f656b30c2f39dd32fdf6827c4124f0fcd7c9f37cf31266909469
|
7
|
+
data.tar.gz: 77e4ae1ed50316a895c360f99f33d8c9138ee0556d3c1707fb854d7690019183d2f3ce980ee515a3c98c27bb7ab7e07599d6e191efea64bec0968cd169971936
|
data/README.md
CHANGED
@@ -26,14 +26,27 @@ At the moment, the only things you need, are the hostname and a :private_network
|
|
26
26
|
|
27
27
|
### Multiple private network adapters
|
28
28
|
|
29
|
-
If you have multiple network adapters
|
29
|
+
If you have multiple network adapters i.e.:
|
30
30
|
|
31
|
-
|
31
|
+
devel.vm.network "private_network", ip: 10.0.0.1
|
32
|
+
devel.vm.network "private_network", ip: 10.0.0.2
|
33
|
+
|
34
|
+
you can specify which hostnames are bound to which IP by passing a `Map[String]Array` mapping the IP of the network to an array of hostnames to create. eg:
|
35
|
+
|
36
|
+
config.multihostsupdater.aliases = {'10.0.0.1' => ['foo.com', 'bar.com'], '10.0.0.2' => ['baz.com', 'bat.com']}
|
32
37
|
|
33
38
|
This will produce host entries like so:
|
34
39
|
|
35
40
|
10.0.0.1 foo.com
|
36
|
-
10.0.0.
|
41
|
+
10.0.0.1 bar.com
|
42
|
+
10.0.0.2 baz.com
|
43
|
+
10.0.0.2 bat.com
|
44
|
+
|
45
|
+
There are some situations in which you don't want Virtualbox to handle multiple private network interfaces. For instance, this is the case of vpn interfaces (like Openvpn tun interfaces).
|
46
|
+
|
47
|
+
In these cases you can use the _config.multihostsupdater.force_ips_ setting in this way:
|
48
|
+
|
49
|
+
config.multihostsupdater.force_ips = ['10.0.0.1','10.0.0.2']
|
37
50
|
|
38
51
|
### Remove on a `vagrant suspend`
|
39
52
|
|
@@ -5,6 +5,9 @@ module VagrantPlugins
|
|
5
5
|
|
6
6
|
def getIps
|
7
7
|
ips = []
|
8
|
+
if @machine.config.multihostsupdater.force_ips.is_a?(Array)
|
9
|
+
return @machine.config.multihostsupdater.force_ips
|
10
|
+
end
|
8
11
|
@machine.config.vm.networks.each do |network|
|
9
12
|
key, options = network[0], network[1]
|
10
13
|
ip = options[:ip] if key == :private_network
|
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-multi-hostsupdater
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Fellows
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.3'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
description: Enables Vagrant to update hosts file on the host machine
|
@@ -45,7 +45,7 @@ executables: []
|
|
45
45
|
extensions: []
|
46
46
|
extra_rdoc_files: []
|
47
47
|
files:
|
48
|
-
- .gitignore
|
48
|
+
- ".gitignore"
|
49
49
|
- Gemfile
|
50
50
|
- LICENSE.txt
|
51
51
|
- README.md
|
@@ -70,17 +70,17 @@ require_paths:
|
|
70
70
|
- lib
|
71
71
|
required_ruby_version: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
77
77
|
requirements:
|
78
|
-
- -
|
78
|
+
- - ">="
|
79
79
|
- !ruby/object:Gem::Version
|
80
80
|
version: '0'
|
81
81
|
requirements: []
|
82
82
|
rubyforge_project:
|
83
|
-
rubygems_version: 2.4.1
|
83
|
+
rubygems_version: 2.4.5.1
|
84
84
|
signing_key:
|
85
85
|
specification_version: 4
|
86
86
|
summary: Enables Vagrant to update hosts file on the host machine
|