action :install do
if not installed?
- package package_name
+ package package_name do
+ version new_resource.version
+ end
updated = true
else
attribute :name, :kind_of => String, :name_attribute => true
attribute :package, :kind_of => String
+attribute :version, :kind_of => String
attribute :conf, :kind_of => String
attribute :variables, :kind_of => Hash, :default => {}
url "http://packages.elasticsearch.org/elasticsearch/1.0/debian"
key "D88E42B4"
end
+
+apt_source "passenger" do
+ url "https://oss-binaries.phusionpassenger.com/apt/passenger"
+ key "AC40B2F7"
+end
-default[:apt][:sources] = node[:apt][:sources] | [ "brightbox-ruby-ng" ]
+default[:apt][:sources] = node[:apt][:sources] | [ "brightbox-ruby-ng", "passenger" ]
+default[:passenger][:version] = "3.0.21"
default[:passenger][:ruby_version] = "1.9.1"
default[:passenger][:max_pool_size] = 6
default[:passenger][:pool_idle_time] = 300
end
apache_module "passenger" do
+ version node[:passenger][:version]
conf "passenger.conf.erb"
end
# DO NOT EDIT - This file is being maintained by Chef
<IfModule mod_passenger.c>
+<% if node[:passenger][:version] >= "4" -%>
+ PassengerRoot /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini
+ PassengerDefaultRuby /usr/bin/ruby
+<% else -%>
PassengerRoot /usr
+<% end -%>
PassengerRuby /usr/local/bin/passenger-ruby
PassengerUseGlobalQueue on
PassengerMaxPoolSize <%= node[:passenger][:max_pool_size] %>