Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Auto-install vagrant-vbguest and vagrant-hostsupdater plugins #1378

Closed
geerlingguy opened this issue May 21, 2017 · 13 comments
Closed

Auto-install vagrant-vbguest and vagrant-hostsupdater plugins #1378

geerlingguy opened this issue May 21, 2017 · 13 comments

Comments

@geerlingguy
Copy link
Owner

Issue Type

  • Feature Idea

Summary

I noticed in this example, a Vagrantfile was automatically installing a required plugin as part of the vagrant up routine.

Since there's probably an issue or two a month where someone runs into a version combination that causes issues (e.g. box version 1.0.9 has VB guest additions for 5.1.22, but the user has 5.1.24 installed...), it might be good to at least forcefully install the vagrant-vbguest plugin.

Such code would be like:

unless Vagrant.has_plugin?("vagrant-vbguest")
  system("vagrant plugin install vagrant-vbguest")
  puts "Dependencies installed, please try the command again."
  exit
end

(Not sure if we need to exit—can Vagrant use a plugin that's installed during a Vagrant run?)

Any major downside to this? Some super-vigilant people might not need the plugin... but I have it installed, and I'm the one building these base boxes!

@geerlingguy
Copy link
Owner Author

This would help clear up on of the few major hurdles that seems to affect people, e.g. #1378

@oxyc
Copy link
Collaborator

oxyc commented May 21, 2017

Also see this PR over at trellis roots/trellis#829

@geerlingguy
Copy link
Owner Author

Dang, they're all fancy over there in trellis... I would like to basically do as they do, and by default have:

  • vagrant-vbguest
  • vagrant-hostsupdater

Arguments could be made to also install vagrant-cachier by default... but maybe not.

@oxyc
Copy link
Collaborator

oxyc commented May 21, 2017

I've had some odd bugs with vagrant-cachier (albeit I don't treat my VM's well while testing) so personally I would probably remove it if it was a default.

@geerlingguy
Copy link
Owner Author

I've had some odd bugs with vagrant-cachier

Good, so it's not just me :) That's a good argument for not including it as default.

@geerlingguy geerlingguy changed the title Auto-install vagrant-vbguest plugin? Auto-install vagrant-vbguest and vagrant-hostsupdater plugins May 22, 2017
@heddn
Copy link
Contributor

heddn commented May 24, 2017

I've had issues with cachier too. The others are fine to install by default. I'd almost add vagrant-auto_network and/or vagrant-bindfs. And not required, but vagrant-hostmanager is also pretty sweet.

@frob
Copy link
Contributor

frob commented May 25, 2017

I would argue vagrant-hostupdater as optional as well. We sometimes need to edit our host files manually and programs, such as gasmask on mac, can be troublesome with hostupdater.

oxyc added a commit to oxyc/drupal-vm that referenced this issue May 31, 2017
oxyc added a commit to oxyc/drupal-vm that referenced this issue Jun 1, 2017
@oxyc
Copy link
Collaborator

oxyc commented Jun 2, 2017

My vote still goes for including vagrant-hostsupdater by default. Mostly because it removes another step from the quick start guide. I added it as a separate commit in case we want to drop it though.

Out of curiosity, why use gasmask rather than just editing the file yourself?

@geerlingguy
Copy link
Owner Author

hostsupdater will be a default, as I think the 80% use case (I'd argue for 99+%) requires it for simplicity. But it's easy enough to override by overriding the plugin list in your own config.yml, local.config.yml, etc.

geerlingguy added a commit that referenced this issue Jun 2, 2017
Issue #1378: Auto-install Vagrant plugins
@geerlingguy
Copy link
Owner Author

Fixed via merged PR from @oxyc - thanks!

@frob
Copy link
Contributor

frob commented Jun 2, 2017

If it is overwritable then I would also argue for including it. How would it be overwritten?

@oxyc
Copy link
Collaborator

oxyc commented Jun 2, 2017

Add this to your config.yml:

vagrant_plugins:
  - name: vagrant-vbguest

@frob
Copy link
Contributor

frob commented Jun 2, 2017

Okay, so just redefine the vagrant_plugins. I was thinking it might be a black list or something. Thank you.

We should add that to the docs: PR #1402

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants