Last active
December 18, 2015 16:29
-
-
Save rombob/5811844 to your computer and use it in GitHub Desktop.
init cookbook for preloading package to vagrant cache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# path: cookbooks/couchbase-vagrant-init/recipes/default.rb | |
ruby_block 'put_downloaded_package_to_cache_folder' do | |
block do | |
package_file = '/tmp/vagrant_init/couchbase-server-community_x86_64_2.0.1.deb' | |
FileUtils.copy(package_file, Chef::Config[:file_cache_path]) | |
FileUtils.chown('vagrant', 'vagrant', package_file, :verbose => true) | |
end | |
only_if { (File.exists? '/tmp/vagrant_init/couchbase-server-community_x86_64_2.0.1.deb') && (Dir.exists? Chef::Config[:file_cache_path]) } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment