vagrant-hosts 2.1.5 → 2.2.0
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 +13 -5
- data/CHANGELOG +12 -0
- data/README.markdown +62 -56
- data/lib/vagrant-hosts/addresses.rb +9 -7
- data/lib/vagrant-hosts/config.rb +7 -0
- data/lib/vagrant-hosts/plugin.rb +5 -8
- data/lib/vagrant-hosts/version.rb +1 -1
- metadata +9 -7
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
NmEyNTU5YzljMjY1ZDU2YWRhYWY1YWY1MThiNjgyNTIwMmM0N2RjZQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
Y2YwNWQ5ZmRlZTMxNzBmNTE5OTU0OWYzNDFkMDEwNjllOTY2YTE1Yw==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
YWQ0YTU2OTgwMzRiYzQxNTkwNGUxMjNjMGU2ZjQ2YThlNWIzMmQwMjk1OGNl
|
10
|
+
ZmEzY2RiYTdkMTg1ZDc0ZWY4ZWZiNWE4NTVmYjViMDRmYWZkZGJlYmUxNjBi
|
11
|
+
NmVlOTFmMjE1NDllNTVhYzIyZWNmOTYwZGQ5NTY1MjJlNzMwNTI=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
YzNiNWUxM2JjNzAwOTZjZWE5ZDhjMzgxNTkzMzU0OTBiMmRkYWUzNjZjOTk2
|
14
|
+
ZThkNTM3MzFkZmRlYzkyNTllYWUyODM0OWEwODFjMDdjZTY3NmJlMjg0YjQ2
|
15
|
+
ZWQwZTMxMDBkZGUyMTljZmRhZGM0Y2FkMjA0OTc5Y2JiOTA4NTc=
|
data/CHANGELOG
CHANGED
@@ -1,6 +1,18 @@
|
|
1
1
|
CHANGELOG
|
2
2
|
=========
|
3
3
|
|
4
|
+
2.2.0
|
5
|
+
-----
|
6
|
+
|
7
|
+
2014-07-30
|
8
|
+
|
9
|
+
This is a backwards compatible feature release
|
10
|
+
|
11
|
+
* (GH-24) Allow users to enable/disable localhost entries
|
12
|
+
* (GH-35) Add support for OSX guests
|
13
|
+
|
14
|
+
Thanks to Jeff Goldschrafe for their work on this release.
|
15
|
+
|
4
16
|
2.1.5
|
5
17
|
-----
|
6
18
|
|
data/README.markdown
CHANGED
@@ -8,73 +8,79 @@ Synopsis
|
|
8
8
|
|
9
9
|
Manually specify addresses:
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
11
|
+
```ruby
|
12
|
+
Vagrant.configure('2') do |config|
|
13
|
+
config.vm.box = "ubuntu-12.04-server-i386"
|
14
|
+
|
15
|
+
config.vm.provision :hosts do |provisioner|
|
16
|
+
# Add a single hostname
|
17
|
+
provisioner.add_host '10.0.2.2', ['myhost.vagrantup.internal']
|
18
|
+
|
19
|
+
# Or a fqdn and a short hostname
|
20
|
+
provisioner.add_host '10.0.2.3', ['myotherhost.vagrantup.internal', 'myotherhost']
|
21
|
+
|
22
|
+
# Or as many aliases as you like!
|
23
|
+
provisioner.add_host '10.0.2.5', [
|
24
|
+
'mypuppetmaster.vagrantup.internal',
|
25
|
+
'puppet.vagrantup.internal',
|
26
|
+
'mypuppetmaster',
|
27
|
+
'puppet'
|
28
|
+
]
|
29
|
+
end
|
30
|
+
end
|
31
|
+
```
|
30
32
|
|
31
33
|
- - -
|
32
34
|
|
33
35
|
Autodetect internal network addresses and autoconfigure hosts:
|
34
36
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
37
|
+
```ruby
|
38
|
+
# Autoconfigure hosts. This will copy the private network addresses from
|
39
|
+
# each VM and update hosts entries on all other machines. No further
|
40
|
+
# configuration is needed.
|
41
|
+
Vagrant.configure('2') do |config|
|
42
|
+
|
43
|
+
config.vm.define :first do |node|
|
44
|
+
node.vm.box = "ubuntu-12.04-server-i386"
|
45
|
+
node.vm.network :private_network, :ip => '10.20.1.2'
|
46
|
+
node.vm.provision :hosts
|
47
|
+
end
|
48
|
+
|
49
|
+
config.vm.define :second do |node|
|
50
|
+
node.vm.box = "ubuntu-12.04-server-i386"
|
51
|
+
node.vm.network :private_network, :ip => '10.20.1.3'
|
52
|
+
node.vm.provision :hosts
|
53
|
+
end
|
54
|
+
end
|
55
|
+
```
|
52
56
|
|
53
57
|
- - -
|
54
58
|
|
55
59
|
Use autodetection with manual entries
|
56
60
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
end
|
61
|
+
```ruby
|
62
|
+
Vagrant.configure('2') do |config|
|
63
|
+
|
64
|
+
config.vm.define :first do |node|
|
65
|
+
node.vm.box = "ubuntu-12.04-server-i386"
|
66
|
+
node.vm.network :private_network, :ip => '10.20.1.2'
|
67
|
+
node.vm.provision :hosts do |provisioner|
|
68
|
+
provisioner.autoconfigure = true
|
69
|
+
provisioner.add_host '172.16.3.10', ['yum.mirror.local']
|
70
|
+
end
|
71
|
+
|
72
|
+
end
|
73
|
+
|
74
|
+
config.vm.define :second do |node|
|
75
|
+
node.vm.box = "ubuntu-12.04-server-i386"
|
76
|
+
node.vm.network :private_network, :ip => '10.20.1.3'
|
77
|
+
node.vm.provision :hosts do |provisioner|
|
78
|
+
provisioner.autoconfigure = true
|
79
|
+
provisioner.add_host '172.16.3.11', ['apt.mirror.local']
|
77
80
|
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
```
|
78
84
|
|
79
85
|
Supported Platforms
|
80
86
|
-------------------
|
@@ -3,9 +3,8 @@ module VagrantHosts::Addresses
|
|
3
3
|
private
|
4
4
|
|
5
5
|
def all_hosts(config)
|
6
|
-
|
7
6
|
all_hosts = []
|
8
|
-
all_hosts += local_hosts(@machine)
|
7
|
+
all_hosts += local_hosts(@machine, config)
|
9
8
|
|
10
9
|
if config.autoconfigure
|
11
10
|
all_hosts += vagrant_hosts(@env)
|
@@ -30,11 +29,14 @@ module VagrantHosts::Addresses
|
|
30
29
|
hostnames
|
31
30
|
end
|
32
31
|
|
33
|
-
def local_hosts(machine)
|
34
|
-
[
|
35
|
-
|
36
|
-
|
37
|
-
|
32
|
+
def local_hosts(machine, config)
|
33
|
+
entries = [['127.0.0.1', ['localhost']]]
|
34
|
+
|
35
|
+
if config.add_localhost_hostnames
|
36
|
+
entries << ['127.0.1.1', hostnames_for_machine(machine)]
|
37
|
+
end
|
38
|
+
|
39
|
+
entries
|
38
40
|
end
|
39
41
|
|
40
42
|
def vagrant_hosts(env)
|
data/lib/vagrant-hosts/config.rb
CHANGED
@@ -12,9 +12,12 @@ module VagrantHosts
|
|
12
12
|
# other vagrant machines
|
13
13
|
attr_accessor :autoconfigure
|
14
14
|
|
15
|
+
attr_accessor :add_localhost_hostnames
|
16
|
+
|
15
17
|
def initialize
|
16
18
|
@hosts = []
|
17
19
|
@autoconfigure = UNSET_VALUE
|
20
|
+
@add_localhost_hostnames = UNSET_VALUE
|
18
21
|
end
|
19
22
|
|
20
23
|
# Register a host for entry
|
@@ -42,6 +45,10 @@ module VagrantHosts
|
|
42
45
|
@autoconfigure = false
|
43
46
|
end
|
44
47
|
end
|
48
|
+
|
49
|
+
if @add_localhost_hostnames == UNSET_VALUE
|
50
|
+
@add_localhost_hostnames = true
|
51
|
+
end
|
45
52
|
end
|
46
53
|
|
47
54
|
# @param other [VagrantHosts::Config]
|
data/lib/vagrant-hosts/plugin.rb
CHANGED
@@ -22,14 +22,11 @@ class VagrantHosts::Plugin < Vagrant.plugin(2)
|
|
22
22
|
|
23
23
|
# Guest capabilities for vagrant-hosts
|
24
24
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
guest_capability(:solaris, 'sync_hosts') do
|
31
|
-
require_relative 'cap'
|
32
|
-
VagrantHosts::Cap::SyncHosts::POSIX
|
25
|
+
[:darwin, :linux, :solaris].each do |os|
|
26
|
+
guest_capability(os, 'sync_hosts') do
|
27
|
+
require_relative 'cap'
|
28
|
+
VagrantHosts::Cap::SyncHosts::POSIX
|
29
|
+
end
|
33
30
|
end
|
34
31
|
|
35
32
|
guest_capability(:windows, 'sync_hosts') do
|
metadata
CHANGED
@@ -1,17 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-hosts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adrien Thebo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-30 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description:
|
14
|
-
|
13
|
+
description: ! ' Manage static DNS entries and configuration for Vagrant guests.
|
14
|
+
|
15
|
+
'
|
15
16
|
email: adrien@somethingsinistral.net
|
16
17
|
executables: []
|
17
18
|
extensions: []
|
@@ -47,18 +48,19 @@ require_paths:
|
|
47
48
|
- lib
|
48
49
|
required_ruby_version: !ruby/object:Gem::Requirement
|
49
50
|
requirements:
|
50
|
-
- - '>='
|
51
|
+
- - ! '>='
|
51
52
|
- !ruby/object:Gem::Version
|
52
53
|
version: '0'
|
53
54
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
54
55
|
requirements:
|
55
|
-
- - '>='
|
56
|
+
- - ! '>='
|
56
57
|
- !ruby/object:Gem::Version
|
57
58
|
version: '0'
|
58
59
|
requirements: []
|
59
60
|
rubyforge_project:
|
60
|
-
rubygems_version: 2.
|
61
|
+
rubygems_version: 2.2.1
|
61
62
|
signing_key:
|
62
63
|
specification_version: 4
|
63
64
|
summary: Manage static DNS on vagrant guests
|
64
65
|
test_files: []
|
66
|
+
has_rdoc: true
|