Skip to content

Commit eb304ad

Browse files
authored
Merge pull request #572 from bovy89/master
remove www pool from defaults
2 parents 7150193 + 5d21b37 commit eb304ad

File tree

4 files changed

+23
-13
lines changed

4 files changed

+23
-13
lines changed

data/default.yaml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,3 @@ lookup_options:
44
php::fpm::pools:
55
merge: first
66

7-
php::fpm::pools:
8-
www:
9-
catch_workers_output: 'no'
10-
listen: '127.0.0.1:9000'
11-
listen_backlog: '-1'
12-
pm: dynamic
13-
pm_max_children: 50
14-
pm_max_requests: 0
15-
pm_max_spare_servers: 35
16-
pm_min_spare_servers: 5
17-
pm_start_servers: 5
18-
request_terminate_timeout: 0

manifests/init.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
$fpm_service_ensure = $php::params::fpm_service_ensure,
136136
$fpm_service_name = $php::params::fpm_service_name,
137137
$fpm_service_provider = undef,
138-
Hash $fpm_pools = {},
138+
Hash $fpm_pools = $php::params::fpm_pools,
139139
Hash $fpm_global_pool_settings = {},
140140
$fpm_inifile = $php::params::fpm_inifile,
141141
$fpm_package = undef,

manifests/params.pp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,21 @@
1515
$phpunit_max_age = 30
1616
$pool_purge = false
1717

18+
$fpm_pools = {
19+
'www' => {
20+
'catch_workers_output' => 'no',
21+
'listen' => '127.0.0.1:9000',
22+
'listen_backlog' => '-1',
23+
'pm' => 'dynamic',
24+
'pm_max_children' => 50,
25+
'pm_max_requests' => 0,
26+
'pm_max_spare_servers' => 35,
27+
'pm_min_spare_servers' => 5,
28+
'pm_start_servers' => 5,
29+
'request_terminate_timeout' => 0,
30+
},
31+
}
32+
1833
case $facts['os']['family'] {
1934
'Debian': {
2035
$config_root = $php::globals::globals_config_root

spec/classes/php_spec.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,13 @@
309309
end
310310
end
311311
end
312+
313+
describe 'when called with pool_purge => true and fpm_pools => {}' do
314+
let(:params) { { pool_purge: true, fpm_pools: {} } }
315+
316+
it { is_expected.to contain_class('php::fpm').with(pool_purge: true) }
317+
it { is_expected.not_to contain_php__fpm__pool('www') }
318+
end
312319
end
313320
end
314321
end

0 commit comments

Comments
 (0)