Skip to content

Commit

Permalink
remove www pool from defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
bovy89 committed Apr 27, 2020
1 parent 8b99069 commit 5d21b37
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 13 deletions.
12 changes: 0 additions & 12 deletions data/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,3 @@ lookup_options:
php::fpm::pools:
merge: first

php::fpm::pools:
www:
catch_workers_output: 'no'
listen: '127.0.0.1:9000'
listen_backlog: '-1'
pm: dynamic
pm_max_children: 50
pm_max_requests: 0
pm_max_spare_servers: 35
pm_min_spare_servers: 5
pm_start_servers: 5
request_terminate_timeout: 0
2 changes: 1 addition & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
$fpm_service_ensure = $php::params::fpm_service_ensure,
$fpm_service_name = $php::params::fpm_service_name,
$fpm_service_provider = undef,
Hash $fpm_pools = {},
Hash $fpm_pools = $php::params::fpm_pools,
Hash $fpm_global_pool_settings = {},
$fpm_inifile = $php::params::fpm_inifile,
$fpm_package = undef,
Expand Down
15 changes: 15 additions & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,21 @@
$phpunit_max_age = 30
$pool_purge = false

$fpm_pools = {
'www' => {
'catch_workers_output' => 'no',
'listen' => '127.0.0.1:9000',
'listen_backlog' => '-1',
'pm' => 'dynamic',
'pm_max_children' => 50,
'pm_max_requests' => 0,
'pm_max_spare_servers' => 35,
'pm_min_spare_servers' => 5,
'pm_start_servers' => 5,
'request_terminate_timeout' => 0,
},
}

case $facts['os']['family'] {
'Debian': {
$config_root = $php::globals::globals_config_root
Expand Down
7 changes: 7 additions & 0 deletions spec/classes/php_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,13 @@
end
end
end

describe 'when called with pool_purge => true and fpm_pools => {}' do
let(:params) { { pool_purge: true, fpm_pools: {} } }

it { is_expected.to contain_class('php::fpm').with(pool_purge: true) }
it { is_expected.not_to contain_php__fpm__pool('www') }
end
end
end
end

0 comments on commit 5d21b37

Please sign in to comment.