opscode/chef-metal-vagrant — pull request #7 by hosh (2014-09-30 18:57:46+00:00)
Title: Add handling for special vagrant options

Two common vagrant options are:

config.vm.synced_folders
config.vm.network

These do not call #= like many of the vagrant configurations
and are regular method calls. This commit intercepts this in the
merged vagrant config options, allowing someone to configure them
without having to use a kludge with chef-metal. Thus, you can do:

machine_options :vagrant_options => {
'vm.synced_folder' => ['/some/folder', '/tmp/cache'],
'vm.network' => [:public_network, { bridge: 'eth1' }],
}

and it will generate

config.vm.synced_folder('/some/folder', '/tmp/cache')
config.vm.network(:public_network, {bridge: 'eth1'})

The value passed should be an array of arguments.

The downside is that if the Vagrantfile config format changes, this
would break.

This commit is written in a way to allow additional options that
follow the same patter. Add the keys to SPECIAL_VAGRANT_OPTIONS to
intercept those.