vagrant-hostmanager 1.8.1 → 1.8.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 01a7af3c6beb7ab58a6a947d15c748145e731f0b
4
- data.tar.gz: 9280476ebe529451069972c6b7a7b5971ef7965f
3
+ metadata.gz: 20391c2e9ad7167864e2778e8cd81ce144558883
4
+ data.tar.gz: 49f58ab529f9a1b45302d0ea9a4ede21e5fff8d5
5
5
  SHA512:
6
- metadata.gz: bf54aafe8e2b1e067a087c4915179e0029c214b237be0f56b74bc4fcc0bb82b3c9d76b628e4967efdfe3f2315e9f7962c25cc9a372808faa705e53f6b2a0762d
7
- data.tar.gz: bad430453627d73031fcf3689c387154d72ecd27610348242347d4c925901ec05097fd0b7c9c00a754114c68f071c6da6dc77a7af284c840b2dad0756abf4701
6
+ metadata.gz: 5fb5405db5405e03aa33b4d6a1be3967a34714cd37c4832d5e7cf068f8eb0067e37431eb56de310f893429109c15d77b30b96a042dbcb6a9739047312b902ceb
7
+ data.tar.gz: 86ebee7b435cb91694049cf5de4781d151a5186a699962062a2fe842e50ae4df1154336bae678d2adb922c4dac226a5f5b483fe8c3ea84a98c1d70e75d51f8f3
data/README.md CHANGED
@@ -4,24 +4,9 @@ Vagrant Host Manager
4
4
  [![Gem](https://img.shields.io/gem/v/vagrant-hostmanager.svg)](https://rubygems.org/gems/vagrant-hostmanager)
5
5
  [![Gem](https://img.shields.io/gem/dt/vagrant-hostmanager.svg)](https://rubygems.org/gems/vagrant-hostmanager)
6
6
  [![Gem](https://img.shields.io/gem/dtv/vagrant-hostmanager.svg)](https://rubygems.org/gems/vagrant-hostmanager)
7
- [![Twitter](https://img.shields.io/twitter/url/https/github.com/smdahlen/vagrant-hostmanager.svg?style=social)](https://twitter.com/intent/tweet?text=Check%20out%20this%20awesome%20Vagrant%20plugin%21&url=https%3A%2F%2Fgithub.com%2Fsmdahlen%2Fvagrant-hostmanager&hashtags=vagrant%hostmanager&original_referer=)
7
+ [![Twitter](https://img.shields.io/twitter/url/https/github.com/devopsgroup-io/vagrant-hostmanager.svg?style=social)](https://twitter.com/intent/tweet?text=Check%20out%20this%20awesome%20Vagrant%20plugin%21&url=https%3A%2F%2Fgithub.com%devopsgroup-io%2Fvagrant-hostmanager&hashtags=vagrant%hostmanager&original_referer=)
8
8
 
9
- `vagrant-hostmanager` is a Vagrant 1.1+ plugin that manages the `/etc/hosts`
10
- file on guest machines (and optionally the host). Its goal is to enable
11
- resolution of multi-machine environments deployed with a cloud provider
12
- where IP addresses are not known in advance.
13
-
14
- *NOTE:* Version 1.1 of the plugin prematurely introduced a feature to hook into
15
- commands other than `vagrant up` and `vagrant destroy`. Version 1.1 broke support
16
- for some providers. Version 1.2 reverts this feature until a suitable implementation
17
- supporting all providers is available.
18
-
19
- ***Potentially breaking change in v1.5.0:*** the running order on `vagrant up` has changed
20
- so that hostmanager runs before provisioning takes place. This ensures all hostnames are
21
- available to the guest when it is being provisioned
22
- (see [#73](https://github.com/smdahlen/vagrant-hostmanager/issues/73)).
23
- Previously, hostmanager would run as the very last action. If you depend on the old behavior,
24
- see the [provisioner](#provisioner) section.
9
+ `vagrant-hostmanager` is a plugin that manages the `/etc/hosts` file on guest machines (and optionally the host). Its goal is to enable resolution of multi-machine environments deployed with a cloud provider where IP addresses are not known in advance.
25
10
 
26
11
  Installation
27
12
  ------------
@@ -172,6 +157,31 @@ Due to limitations caused by UAC, cancelling out of the UAC prompt will not caus
172
157
  visible errors, however the ```hosts``` file will not be updated.
173
158
 
174
159
 
160
+ Compatibility
161
+ -------------
162
+ This Vagrant plugin has been tested with the following technology.
163
+
164
+ Date Tested | Vagrant Version | vagrant-hostmanager Version | Host (Workstation) Operating System | Guest (DigitalOcean) Operating System
165
+ ------------|-----------------|-----------------------------|-------------------------------------|--------------------------------------
166
+ 03/23/2016 | 1.8.1 | 1.8.1 | Ubuntu 14.04 LTS | CentOS 7.2
167
+ 03/22/2016 | 1.8.1 | 1.8.1 | OS X 10.11.4 | CentOS 7.2
168
+
169
+
170
+ Troubleshooting
171
+ -------------
172
+ * Version 1.1 of the plugin prematurely introduced a feature to hook into
173
+ commands other than `vagrant up` and `vagrant destroy`. Version 1.1 broke support
174
+ for some providers. Version 1.2 reverts this feature until a suitable implementation
175
+ supporting all providers is available.
176
+
177
+ * Potentially breaking change in v1.5.0: the running order on `vagrant up` has changed
178
+ so that hostmanager runs before provisioning takes place. This ensures all hostnames are
179
+ available to the guest when it is being provisioned
180
+ (see [#73](https://github.com/devopsgroup-io/vagrant-hostmanager/issues/73)).
181
+ Previously, hostmanager would run as the very last action. If you depend on the old behavior,
182
+ see the [provisioner](#provisioner) section.
183
+
184
+
175
185
  Contribute
176
186
  ----------
177
187
  To contribute, fork then clone the repository, and then the following:
@@ -205,7 +215,7 @@ To release a new version of vagrant-hostmanager you will need to do the followin
205
215
  * Follow [Semantic Versioning](http://semver.org/).
206
216
  2. Then, create a matching GitHub Release (this will also create a tag):
207
217
  * Preface the version number with a `v`.
208
- * https://github.com/smdahlen/vagrant-hostmanager/releases
218
+ * https://github.com/devopsgroup-io/vagrant-hostmanager/releases
209
219
  3. You will then need to build and push the new gem to RubyGems:
210
220
  * `rake gem:build`
211
221
  * `gem push pkg/vagrant-hostmanager-1.6.1.gem`
@@ -10,6 +10,8 @@ module VagrantPlugins
10
10
  @global_env = global_env
11
11
  @config = Util.get_config(@global_env)
12
12
  @provider = provider
13
+ @logger = Log4r::Logger.new('vagrant::hostmanager::updater')
14
+ @logger.debug("init updater")
13
15
  end
14
16
 
15
17
  def update_guest(machine)
@@ -29,10 +31,14 @@ module VagrantPlugins
29
31
  # download and modify file with Vagrant-managed entries
30
32
  file = @global_env.tmp_path.join("hosts.#{machine.name}")
31
33
  machine.communicate.download(realhostfile, file)
34
+
35
+ @logger.debug("file is: #{file.to_s}")
36
+ @logger.debug("class of file is: #{file.class}")
37
+
32
38
  if update_file(file, machine, false)
33
39
 
34
40
  # upload modified file and remove temporary file
35
- machine.communicate.upload(file, '/tmp/hosts')
41
+ machine.communicate.upload(file.to_s, '/tmp/hosts')
36
42
  if windir
37
43
  machine.communicate.sudo("mv -force /tmp/hosts/hosts.#{machine.name} #{realhostfile}")
38
44
  else
@@ -56,7 +62,7 @@ module VagrantPlugins
56
62
  copy_proc = Proc.new { windows_copy_file(file, hosts_location) }
57
63
  else
58
64
  hosts_location = '/etc/hosts'
59
- copy_proc = Proc.new { `sudo cp #{file} #{hosts_location}` }
65
+ copy_proc = Proc.new { `[ -w #{hosts_location} ] && cat #{file} > #{hosts_location} || sudo cp #{file} #{hosts_location}` }
60
66
  end
61
67
 
62
68
  FileUtils.cp(hosts_location, file)
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module HostManager
3
- VERSION = '1.8.1'
3
+ VERSION = '1.8.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-hostmanager
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.1
4
+ version: 1.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shawn Dahlen
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-02-11 00:00:00.000000000 Z
12
+ date: 2016-06-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
91
  version: '0'
92
92
  requirements: []
93
93
  rubyforge_project:
94
- rubygems_version: 2.4.6
94
+ rubygems_version: 2.4.5
95
95
  signing_key:
96
96
  specification_version: 4
97
97
  summary: A Vagrant plugin that manages the /etc/hosts file within a multi-machine