Sha256: c42720ce1d6c225036becbf6d738938c810a33f75a17f54b5544b21ea73394c2

Contents?: true

Size: 1005 Bytes

Versions: 3

Compression:

Stored size: 1005 Bytes

Contents

#
# Cookbook Name:: nginx
# Recipes:: set_misc
#

set_misc_src_filename = ::File.basename(node['nginx']['set_misc']['url'])
set_misc_src_filepath = "#{Chef::Config['file_cache_path']}/#{set_misc_src_filename}"
set_misc_extract_path = "#{Chef::Config['file_cache_path']}/nginx-set_misc-#{node['nginx']['set_misc']['version']}"

remote_file set_misc_src_filepath do
  source   node['nginx']['set_misc']['url']
  checksum node['nginx']['set_misc']['checksum']
  owner    'root'
  group    'root'
  mode     '0644'
end

bash 'extract_set_misc_module' do
  cwd  ::File.dirname(set_misc_src_filepath)
  code <<-EOH
    mkdir -p #{set_misc_extract_path}
    tar xzf #{set_misc_src_filename} -C #{set_misc_extract_path}
  EOH
  not_if { ::File.exist?(set_misc_extract_path) }
end

node.run_state['nginx_configure_flags'] =
  node.run_state['nginx_configure_flags'] | ["--add-module=#{set_misc_extract_path}/set-misc-nginx-module-#{node['nginx']['set_misc']['version']}"]

include_recipe 'nginx::ngx_devel_module'

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
from-scratch-0.7.0 cookbooks/nginx/recipes/set_misc.rb
from-scratch-0.6.0 cookbooks/nginx/recipes/set_misc.rb
from-scratch-0.5.0 cookbooks/nginx/recipes/set_misc.rb