public
Created

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
#
# Cookbook Name:: download_assets
# Recipe:: default
#
# Copyright 2012, YOUR_COMPANY_NAME
#
# All rights reserved - Do Not Redistribute
#
remote_file "/home/remote/program-#{node[:version]}.tar.gz" do
source "https://retail.test.com/program-#{node[:version]}.tar.gz"
checksum node[:checksum]
notifies :run, "bash[install_program]", :immediately
end
 
bash "install_program" do
user "remote"
cwd "/home/remote"
code <<-EOH
tar -zxf program-#{node[:version]}.tar.gz
EOH
action :nothing
end

#

Cookbook Name:: download_assets

Recipe:: default

#

Copyright 2012, YOUR_COMPANY_NAME

#

All rights reserved - Do Not Redistribute

#
version = node['version']

remote_file "/home/remote/program-#{version}.tar.gz" do
source "https://retail.test.com/program-#{version}.tar.gz"
checksum node['checksum']
notifies :run, "bash[install_program]", :immediately
end

bash "install_program" do
user "remote"
cwd "/home/remote"
code <<-EOH
tar -zxf program-#{version}.tar.gz
EOH
action :nothing
end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.