Skip to content

Commit 552a791

Browse files
committed
fix provisioner issue in vagrant 1.5
relates to #80
1 parent 3350c07 commit 552a791

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

lib/vagrant-hostmanager/plugin.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ class Plugin < Vagrant.plugin('2')
2929
Provisioner
3030
end
3131

32+
# Work-around for vagrant >= 1.5
33+
# It breaks without a provisioner config, so we provide a dummy one
34+
config(:hostmanager, :provisioner) do
35+
::Vagrant::Config::V2::DummyConfig.new
36+
end
37+
3238
command(:hostmanager) do
3339
require_relative 'command'
3440
Command

test/Vagrantfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,10 @@ Vagrant.configure('2') do |config|
2222
server.vm.hostname = 'bender'
2323
server.vm.network :private_network, :ip => '10.0.5.3'
2424
end
25-
end
25+
26+
config.vm.define :server3 do |server|
27+
server.vm.hostname = 'leena'
28+
server.vm.network :private_network, :ip => '10.0.5.4'
29+
server.vm.provision :hostmanager
30+
end
31+
end

0 commit comments

Comments
 (0)