The Essential remote_file remote_file "/opt/sauce/sauce_#{node[:sauce][:version]}.tgz" do source "#{node[:sauce][:url]}/awesome_sauce_#{node[:sauce][:version]}.tgz" end
Better: Give It a Checksum remote_file "/opt/sauce/sauce_#{node[:sauce][:version]}.tgz" do source "#{node[:sauce][:url]}/awesome_sauce_#{node[:sauce][:version]}.tgz" * checksum node[:sauce][:checksum] end
Ever Better: Put It in the Chef Cache # v-------------------------------v * remote_file "#{Chef::Config[:file_cache_path]}/sauce_#{node[:sauce][:version]}.tgz" do source "#{node[:sauce][:url]}/awesome_sauce_#{node[:sauce][:version]}.tgz" checksum node[:sauce][:checksum] end
RVM 4 custom RVM install ahead of chef-rvm 4 install RVM via tarball according to the offline steps 4 rvm mount ruby-version.tgz 4 carry on with our uses of chev-rvm 4 rvm-shell mostly
python_shim.rb %w(python-pip python-virtualenv).each do |pkg| package pkg do action :install end end link "/usr/local/bin/pip" do to "/usr/bin/pip" end directory "/root/.pip/" file "/root/.pip/pip.conf" do content "[global]\ntimeout = 1\n" end
class ::Chef class Provider class RemoteFile class Content < Chef::FileContentManagement::ContentBase private def current_resource_matches_target_checksum? ::Chef::Log.info("Airgapped - skipping content checksum for #{@new_resource}") true end end end end end
4 Mind the Gap photo by Clicsouris 4 Vagrant - Mitchell Hashimoto/Hashicorp 4 vagrant-cachier - Fabio Rehm 4 fpm - Jordan Sissell 4 knife-solo - Mat Schaffer