Skip to content

Commit 5581f1c

Browse files
committed
migrate provisioner to use Updater class
1 parent 04dee9b commit 5581f1c

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

lib/vagrant-hostmanager/provisioner.rb

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
1+
require 'vagrant-hostmanager/hosts_file/updater'
2+
13
module VagrantPlugins
24
module HostManager
35
class Provisioner < Vagrant.plugin('2', :provisioner)
4-
include HostsFile
56

67
def initialize(machine, config)
78
super(machine, config)
8-
@global_env = machine.env
9-
@provider = machine.provider_name
10-
@config = Util.get_config(@global_env)
9+
global_env = machine.env
10+
@config = Util.get_config(global_env)
11+
@updater = HostsFile::Updater.new(global_env, machine.provider_name)
1112
end
1213

1314
def provision
14-
update_guest(@machine)
15+
@updater.update_guest(@machine)
1516
if @config.hostmanager.manage_host?
16-
update_host
17+
@updater.update_host
1718
end
1819
end
1920
end

0 commit comments

Comments
 (0)