diff --git a/lib/vagrant-hostmanager/action/update_all.rb b/lib/vagrant-hostmanager/action/update_all.rb index d2671d9..eb76d51 100644 --- a/lib/vagrant-hostmanager/action/update_all.rb +++ b/lib/vagrant-hostmanager/action/update_all.rb @@ -23,8 +23,6 @@ def initialize(app, env) end def call(env) - # skip if machine is already active on up action - return @app.call(env) if @machine.id && env[:machine_action] == :up # skip if machine is not active on destroy action return @app.call(env) if !@machine.id && env[:machine_action] == :destroy diff --git a/lib/vagrant-hostmanager/plugin.rb b/lib/vagrant-hostmanager/plugin.rb index 86dab08..b299315 100644 --- a/lib/vagrant-hostmanager/plugin.rb +++ b/lib/vagrant-hostmanager/plugin.rb @@ -17,7 +17,7 @@ class Plugin < Vagrant.plugin('2') end action_hook(:hostmanager, :machine_action_up) do |hook| - hook.prepend(Action.update_all) + hook.after(Vagrant::Action::Builtin::Provision, Action.update_all) end action_hook(:hostmanager, :machine_action_destroy) do |hook|