Open cgideon opened 9 years ago
While it's not about selective package install, there is a command that we can run to provision with different provisioners. Use --provision-with x where x is the provisioner.
i.e. vagrant provision --provision-with shell
Documentation can be found here: http://docs.vagrantup.com/v2/cli/provision.html http://docs.vagrantup.com/v2/provisioning/basic_usage.html
Check this out: http://www.linuxjournal.com/article/2807
There is a couple ways we can do this:
Thoughts?
I like the --provision-with as well, but in order to do that I think you have to have multiple different provisioner files, which can be rather cludgy unless you can chain them together. Feel free to correct me if I'm wrong though.
I like option 2 the best, though that still requires modifying a file instead of asking for user input which is possibly the better route to go.
I looks like --provison-with x,y, would run scripts x,y and z like: --provision-with Joshscript,coryscript,jims
option 2 can prompt the user for input or just take arguments, no modifying of files.
Would it be possible to provide a way for the user to selectively choose which packages they want to install without modifying the provisioner? i.e. I want Java, TMux and ZSH but not anything else? Or I want Node and all the NPM managed packages but not Java?
Thoughts?