-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support vagrant-vbguest plugin #30
Conversation
Another challenge (besides of avoiding multiple executions) is that when hooking to |
Ugh, yet another issue. It seems that it is not possible to hook after/before an action that has not been added to the middleware stack yet. And vagrant-vbguest plugin is loaded after proxyconf. Won't help to hook to |
This seems to be a blocker for me. I can't think of a way to hook proxyconf actions between Any help? @mitchellh, @fgrehm? |
@tmatilai you should be able to "force" vbguest to be loaded prior to doing your proxyconf magic. an example can be found at multiprovider-snap. Hope that helps :) |
@fgrehm Thanks! I thought about something like that but didn't try it out as it felt a bit "wrong" as we don't actually depend on the vbguest plugin. But maybe that's the only way. I'll play more with it tonight. |
I think that's fine, it's sort of like a "loose dependency" ;) |
I guess you're right. If the plugin is installed (i.e. |
A middleware class that builds and runs the stack based on the specified block, but only once.
Our configuration actions are now run in an isolated Runner, so we can do all the magic before calling the next middleware.
The middleware stack can now be safely hooked to many actions as it is executed only once.
[ci skip]
Ok, this seems to be working. Testing and reviewing appreciated. =) I'll at least add some tests for the |
I won't be able to test it today but looking at the code things seems to be fine :) |
Thanks, Fábio! The trap with |
I'll merge this and push a pre-release version to rubygems to make it easier for people to test. Seems to work fine on my manual testing. (I'll keep dreaming of the acceptance tests... :)) |
Support vagrant-vbguest plugin
Released as v0.6.0.rc1, which can be installed by:
|
Ensure the proxies are configured before vagrant-vbguest plugin. The plugin hooks to the
VagrantPlugins::ProviderVirtualBox::Action::Boot
action so it will get executed earlier than us now.We need to hook to
VagrantVbguest::Middleware
if it is found. But as that action is only called on VM boot with VirtualBox provider, and theProvision
action is still also called, we have to hook to both and add some flag for not configuring the machine twice.Related issue: dotless-de/vagrant-vbguest#77