Created
April 27, 2012 14:50
-
-
Save coderforhire/2509878 to your computer and use it in GitHub Desktop.
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
# | |
# 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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