vagrant-hostmanager 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -39,9 +39,11 @@ module VagrantPlugins
39
39
  # copy the hosts file to each matching machine
40
40
  # TODO append hostname to loopback address
41
41
  matching_machines.each do |machine|
42
- env[:ui].info @translator.t('update', { :name => machine.name })
43
- machine.communicate.upload(path, '/tmp/hosts')
44
- machine.communicate.sudo("mv /tmp/hosts /etc/hosts")
42
+ if machine.communicate.ready?
43
+ env[:ui].info @translator.t('update', { :name => machine.name })
44
+ machine.communicate.upload(path, '/tmp/hosts')
45
+ machine.communicate.sudo("mv /tmp/hosts /etc/hosts")
46
+ end
45
47
  end
46
48
 
47
49
  @app.call(env)
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module HostManager
3
- VERSION = '0.0.2'
3
+ VERSION = '0.0.3'
4
4
  end
5
5
  end
@@ -5,6 +5,10 @@ echo "[server1] /etc/hosts file:"
5
5
  vagrant ssh server1 -c 'cat /etc/hosts'
6
6
  echo "[server2] /etc/hosts file:"
7
7
  vagrant ssh server2 -c 'cat /etc/hosts'
8
+
9
+ vagrant halt
10
+ vagrant up
11
+
8
12
  vagrant destroy server1 -f
9
13
  echo "[server2] /etc/hosts file:"
10
14
  vagrant ssh server2 -c 'cat /etc/hosts'
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: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: