Skip to content

Commit

Permalink
Merge pull request #140 from CrowdSurge/additional-fpm-config
Browse files Browse the repository at this point in the history
add additional config to fpm lwrp
  • Loading branch information
Rockstar04 committed Jul 31, 2015
2 parents ef6bdca + 27f769a commit 7d0c0ad
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion providers/fpm_pool.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ def register_fpm_service
:fpm_pool_start_servres => new_resource.start_servers,
:fpm_pool_min_spare_servers => new_resource.min_spare_servers,
:fpm_pool_max_spare_servers => new_resource.max_spare_servers,
:fpm_pool_chdir => new_resource.chdir
:fpm_pool_chdir => new_resource.chdir,
:fpm_pool_additional_config => new_resource.additional_config
})
notifies :restart, "service[#{node['php']['fpm_package']}]"
end
Expand Down
1 change: 1 addition & 0 deletions resources/fpm_pool.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@
attribute :min_spare_servers, :kind_of => Integer, :default => 1
attribute :max_spare_servers, :kind_of => Integer, :default => 3
attribute :chdir, :kind_of => String, :default => '/'
attribute :additional_config, :kind_of => Hash, :default => {}
3 changes: 3 additions & 0 deletions templates/default/fpm-pool.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ pm.start_servers = <%= @fpm_pool_start_servers %>
pm.min_spare_servers = <%= @fpm_pool_min_spare_servers %>
pm.max_spare_servers = <%= @fpm_pool_max_spare_servers %>
chdir = <%= @fpm_pool_chdir %>
<% @fpm_pool_additional_config.each do |key, value| %>
<%= key %> = <%= value %>
<% end %>

0 comments on commit 7d0c0ad

Please sign in to comment.