8000 manage full pool configuration · guillemcanal/puppet-php@b5c03d4 · GitHub
[go: up one dir, main page]

Skip to content

Commit b5c03d4

Browse files
committed
manage full pool configuration
1 parent 07f1a93 commit b5c03d4

File tree

2 files changed

+471
-22
lines changed

2 files changed

+471
-22
lines changed

manifests/fpm/pool.pp

Lines changed: 40 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,42 @@
1-
define php::fpm::pool($source = undef, $content = undef, $require = undef) {
2-
include php::fpm
1+
define php::fpm::pool(
2+
$pool_prefix = undef,
3+
$user = 'www-data',
4+
$group = 'www-data',
5+
$listen = '127.0.0.1:9000',
6+
$listen_backlog = undef,
7+
$listen_type = 'tcp',
8+
$socket_owner = undef,
9+
$socket_group = undef,
10+
$socket_mode = undef,
11+
$allowed_clients = undef,
12+
$pm = 'dynamic',
13+
$pm_max_children = 5,
14+
$pm_start_servers = 2,
15+
$pm_min_spare_servers = 1,
16+
$pm_max_spare_servers = 3,
17+
$pm_process_idle_timeout = '10s',
18+
$pm_max_requests = undef,
19+
$pm_status_path = undef,
20+
$ping_path = undef,
21+
$ping_response = undef,
22+
$access_log = undef,
23+
$access_log_format = undef,
24+
$slowlog = undef,
25+
$slowlog_timeout = undef,
26+
$terminate_timeout = undef,
27+
$chroot = undef,
28+
$php_settings = undef,
29+
) {
30+
include php::fpm
331

4-
file { "${name}.conf":
5-
path => "${php::params::fpm_pool_dir}${name}.conf",
6-
owner => root,
7-
group => root,
8-
ensure => file,
9-
source => $source ? {
10-
undef => undef,
11-
default => "${source}${name}.conf",
12-
},
13-
content => $content ? {
14-
undef => undef,
15-
default => template("${source}${name}.conf.erb"),
16-
},
17-
require => [
18-
Class["php::fpm::install"],
19-
$require,
20-
],
21-
before => Class["php::fpm::service"],
22-
notify => Class["php::fpm::service"],
23-
}
32+
file { "${name}.conf":
33+
ensure => file,
34+
path => "${php::params::fpm_pool_dir}${name}.conf",
35+
owner => 'root',
36+
group => 'root',
37+
content => template('php/fpm-pool.conf.erb'),
38+
require => Class['php::fpm::install'],
39+
before => Class['php::fpm::service'],
40+
notify => Class['php::fpm::service'],
41+
}
2442
}

0 commit comments

Comments
 (0)
0