Skip to content

Instantly share code, notes, and snippets.

@0xGGGGG
Created January 1, 2013 00:17
Show Gist options
  • Save 0xGGGGG/4424096 to your computer and use it in GitHub Desktop.
Save 0xGGGGG/4424096 to your computer and use it in GitHub Desktop.
nginx-premature-build
nginx_version = "1.2.6"
download_url = "http://nginx.org/download/nginx-#{nginx_version}.tar.gz"
file_path = "#{Chef::Config[:file_cache_path]}/nginx-#{nginx_version}.tar.gz"
remote_file file_path do
owner "root"
group "root"
mode 00644
source download_url
backup 2
notifies :run, "bash[install_nginx]", :immediately
end
bash "install_nginx" do
user "root"
cwd "#{Chef::Config[:file_cache_path]}"
code <<-NGINX
tar -zxf nginx-#{nginx_version}.tar.gz
(cd nginx-#{nginx_version}/ && ./configure && make && make install)
NGINX
# action :nothing
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment