|
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 |
3 | 31 |
|
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 | + } |
24 | 42 | }
|
0 commit comments