mitchellh/vagrant — pull request #5002 by tknerr (2014-12-17 00:08:08+00:00)
Title: Add `installer_download_path` config option to chef provisioners

This PR adds the `installer_download_path` config option to all chef provisioners. It is effective only when the Chef auto-install feature is used.

Example Vagrantfile:
```ruby
Vagrant::configure("2") do |config|
config.vm.define :foo do | foo_config |
foo_config.vm.box = "chef/ubuntu-12.04-i386"
foo_config.vm.provision :chef_solo do |chef|
chef.version = "12.0.1"
chef.installer_download_path = "/tmp/vagrant-cache/vagrant_omnibus"
chef.cookbooks_path = "./cookbooks"
chef.add_recipe "hello"
end
end
end
```

This will ensure that the omnibus package is downloaded to the given directory (i.e. `/tmp/vagrant-cache/vagrant_omnibus/chef_12.0.1-1_amd64.deb` in this case).

It is a prerequisite for enabling caching of the omnibus packages via vagrant-cachier (see #4989).

For further details and context:
* original addition of the `-d` and `-f` flag to install.sh: https://github.com/opscode/opscode-omnitruck/pull/33
* adding omnibus package cacheability to the vagrant-omnibus plugin: https://github.com/opscode/vagrant-omnibus/pull/73
* request for including the `-d` and `-f` flag in the official docs: https://github.com/opscode/chef-docs/issues/429

Within this PR I only added support for the `-d` flag as this is the only thing required for enabling caching. So far I never needed the `-f` option. Sacrificing completeness for YAGNI here ;-)