Last Updated: February 25, 2016
·
1.139K
· ivadim

Vagrant: caching omnibus chef package

Tired to wait while Vagrant download and install chef package?!

Install vagrant-cachier plugin:

vagrant plugin install vagrant-cachier

Turn on plugin:

Vagrant.configure("2") do |config|
  # ...
  config.cache.auto_detect = true
end

And add "pinch of magic" to ~/.vagrant.d/Vagrantfile:

if (defined? VagrantPlugins::Cachier && defined? VagrantPlugins::Omnibus)
  ENV['OMNIBUS_INSTALL_URL']="https://gist.github.com/hectcastro/6443633/raw/install.sh"
  puts "setting custom OMNIBUS_INSTALL_URL for vagrant-cachier: #{ENV['OMNIBUS_INSTALL_URL']}"
end

P.s: Don't forget to run vagrant reload

Links:

https://github.com/fgrehm/vagrant-cachier

https://github.com/fgrehm/vagrant-cachier/issues/13