Closed gau1991 closed 8 years ago
Instead of using /tmp use Chef cache for downloading using remote_file resource.
/tmp
# download the latest wordpress tar file remote_file '/etc/latest.tar.gz' do source 'http://wordpress.org/latest.tar.gz' owner 'root' group 'root' mode '0755' end
using chef cache to download the remote files:
filepath = Chef::Config[:file_cache_path] + '/latest.tar.gz'
remote_file filepath do source sourceurl owner 'root' group 'root' mode '0755' end
Instead of using
/tmp
use Chef cache for downloading using remote_file resource.