Skip to content
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

Add vagrant-cachier support to default Vagrantfile.erb #186

Closed
tfitch opened this issue Aug 12, 2015 · 3 comments · Fixed by #269
Closed

Add vagrant-cachier support to default Vagrantfile.erb #186

tfitch opened this issue Aug 12, 2015 · 3 comments · Fixed by #269
Assignees

Comments

@tfitch
Copy link

tfitch commented Aug 12, 2015

I know that there is now the ability to use a custom Vagrantfile template or inject arbitrary code in to the Vagrantfile, but I'm still interested in adding this addition because it would be reverse compatible (because of the if + has_plugin? combo) for those that don't use the vagrant-cachier plugin. https://github.com/fgrehm/vagrant-cachier

So as a user I want support for the vagrant-cachier plugin if I have it installed on my machine by adding these lines to the default Vagrantfile.erb template.

  if Vagrant.has_plugin?("vagrant-cachier")
    c.cache.scope = :box
    c.cache.auto_detect = true
  end

But it's not that simple to implement well because scope and auto_detect have a couple of value options, so we'd want them to be configurable and not force people to use just that combination of values. That said, we need to draw a line somewhere and this is a great basic implementation. If the user wants to dig in to advanced vagrant-cachier settings like synched_folder_opts then they need to go in to Test Kitchen power user mode with a custom Vagrantfile.erb or inject the custom settings.

@tknerr
Copy link
Contributor

tknerr commented Aug 23, 2015

@tfitch I have this in my global ~/.vagrant.d/Vagrantfile. This kicks in for every test kitchen:
https://github.com/tknerr/bills-kitchen/blob/master/files/home/.vagrant.d/Vagrantfile#L9-L27

@cheeseplus
Copy link
Contributor

I'm all for supporting a feature/config option that makes this easy but I also don't want to make it default. The one scenario I am envisioning is if someone has the plugin installed but doesn't intend or want to use it. I think a configuration option makes more sense - that or abstracting this to a plugin.

@cheeseplus
Copy link
Contributor

Also - #200 where I've made the same request to make this toggleable to prevent it from even getting into the Vagrantfile.

cheeseplus pushed a commit that referenced this issue Jan 5, 2017
Signed-off-by: Seth Thomas <sthomas@chef.io>
@cheeseplus cheeseplus self-assigned this Jan 5, 2017
cheeseplus pushed a commit that referenced this issue Jan 5, 2017
Fix #186 (mostly) and make it easy to use vagrant-cachier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants