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

Support for default options in 'vagrant init' #5

Closed
KieranP opened this issue Mar 9, 2010 · 4 comments
Closed

Support for default options in 'vagrant init' #5

KieranP opened this issue Mar 9, 2010 · 4 comments

Comments

@KieranP
Copy link

KieranP commented Mar 9, 2010

I propose the support of a ~/.vagrantrc file, which is parsed when running commands.

This file, of whatever format (yaml, ruby or otherwise), would store default options that might show up. Right now, in particular, it would be very handy for specifying the default box made, i,e.

YAML:
default_base_box: debian_lenny

Ruby:
Vagrant::Config.run do |config|
config.vm.default_box = 'debian_lenny'
end

@mitchellh
Copy link
Contributor

This is good. Instead of doing a YAML version, we'll probably place a Vagrantfile in the home directory and inject that into the loading process. If you take a look at the Vagrant::Config class, you'll see that it was built for this sort of thing :)

@KieranP
Copy link
Author

KieranP commented Mar 9, 2010

Yep, hence the Ruby section above. The Vagrantfile would need to be a hidden file though. I don't want another file in the Home directory ^_^

@mitchellh
Copy link
Contributor

I meant the vagrant home directory, which defualts to ~/.vagrant/ but is configurable.

@mitchellh
Copy link
Contributor

This is now doable. Any Vagrantfile in the configured home page (defaults to ~/.vagrant/) is now injected into the sequence between box config and project config. The exact Vagrantfile sequence at this point is this:

Default (with gem) => Box => User Defaults (in home dir) => Project specific

http://github.com/mitchellh/vagrant/commit/e09dbfa3675d27dbfd176b547005501eddbdb518

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

No branches or pull requests

2 participants