From f42cdc24bba70bb84ca40cf17ba871efd3ac596e Mon Sep 17 00:00:00 2001 From: Sean OMeara Date: Wed, 18 Dec 2013 20:03:05 -0500 Subject: [PATCH] [COOK-3923] - Enable the list of packages installed by nginx::passenger to be configurable --- attributes/passenger.rb | 3 +++ recipes/passenger.rb | 10 ++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/attributes/passenger.rb b/attributes/passenger.rb index 89110e3e2..361b142e0 100644 --- a/attributes/passenger.rb +++ b/attributes/passenger.rb @@ -33,6 +33,9 @@ node.default['nginx']['passenger']['ruby'] = '/usr/bin/ruby' end +node.default['nginx']['passenger']['packages']['rhel'] = %w[ruby-devel curl-devel] +node.default['nginx']['passenger']['packages']['debian'] = %w[ruby-dev libcurl4-gnutls-dev] + node.default['nginx']['passenger']['spawn_method'] = 'smart-lv2' node.default['nginx']['passenger']['buffer_response'] = 'on' node.default['nginx']['passenger']['max_pool_size'] = 6 diff --git a/recipes/passenger.rb b/recipes/passenger.rb index 36f2d6561..5b6cfbf4e 100644 --- a/recipes/passenger.rb +++ b/recipes/passenger.rb @@ -18,12 +18,14 @@ # packages = value_for_platform_family( - %w[rhel] => %w[ruby-devel curl-devel], - %w[debian] => %w[ruby-dev libcurl4-gnutls-dev] + %w[rhel] => node['nginx']['passenger']['packages']['rhel'], + %w[debian] => node['nginx']['passenger']['packages']['debian'] ) -packages.each do |name| - package name +unless packages.empty? + packages.each do |name| + package name + end end gem_package 'rake'