Skip to content

Commit

Permalink
run hostmanager before provisioners on up action
Browse files Browse the repository at this point in the history
Fixes #73.
  • Loading branch information
pbitty committed May 25, 2014
1 parent fc1fde7 commit 4024856
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions lib/vagrant-hostmanager/action/update_all.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion lib/vagrant-hostmanager/plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down

0 comments on commit 4024856

Please sign in to comment.