chef-provisioning-vagrant
chef-provisioning-vagrant copied to clipboard
Need test-kitchen style Vagrantfile template to control more settings
Would love to see a template like this https://github.com/test-kitchen/kitchen-vagrant/blob/master/templates/Vagrantfile.erb being used to control more of the features of vagrant via chef-provisioning-vagrant.
Would replace this code https://github.com/chef/chef-provisioning-vagrant/blob/542e372aeeaf0e8132b7bfaa9d4740d50feebe35/lib/chef/provisioning/vagrant_driver/driver.rb#L216
I second this. Or, at the least an expansion of that method to write out the "network" and "customize" arrays appropriately.
I third this. I have already forked this code and added "vagrant_cluster" machine options for a project that I needed to work on. The way I implemented it also allows vagrant plugins to be configured.
@evidetta-adbrain want to submit a PR of your work?
My fork is at evidetta-adbrain/chef-provisioning-vagrant@08eebb0ee8ae4710af39f11ec77dea408f361b21 . I have simply added some code which adds keys to the outer_config. What this does is adds any simple config keys to that. It works in the same way as adding keys to the config below.
As I say, I needed this for my own purposes since I was testing an HDFS cluster configuration locally and needed to be able to set up vagrant in a way similar to how AWS would work. The implementation is very simple and it let me create the gem I needed to do my testing. I think this could be improved by also supporting keys in vagrant which do not support simple key-value pairs (i.e. config.vm.network
- as per https://docs.vagrantup.com/v2/networking/basic_usage.html). I would also be in favour of changing the code so that :vagrant_options
and :vagrant_config
are either consolidated or would allow for full configurability of the vagrant VM. My two cents.