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

Add installer_download_path config option to chef provisioners #5002

Merged
merged 4 commits into from Dec 17, 2014

Conversation

tknerr
Copy link
Contributor

@tknerr tknerr commented Dec 17, 2014

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:

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:

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 ;-)

sethvargo added a commit that referenced this pull request Dec 17, 2014
Add `installer_download_path` config option to chef provisioners
@sethvargo sethvargo merged commit 9fa2ea4 into hashicorp:master Dec 17, 2014
@tknerr
Copy link
Contributor Author

tknerr commented Dec 17, 2014

Thanks @sethvargo!

@ghost ghost locked and limited conversation to collaborators Apr 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants