-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2405 from fgrehm/2044-provisioner-hooking
core: support hooking around provisioners runs
- Loading branch information
Showing
3 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
require "log4r" | ||
|
||
module Vagrant | ||
module Action | ||
module Builtin | ||
# This action is basically a wrapper on top of provisioner runs that | ||
# enable plugins to hook around the provisioning itself | ||
class ProvisionerRun | ||
def initialize(app, env, provisioner) | ||
@app = app | ||
@provisioner = provisioner | ||
end | ||
|
||
def call(env) | ||
@app.call(env) | ||
@provisioner.provision | ||
end | ||
end | ||
end | ||
end | ||
end |