Skip to content

Commit

Permalink
add pool_purge option to init.pp
Browse files Browse the repository at this point in the history
  • Loading branch information
bovy89 committed Dec 17, 2019
1 parent fd022ad commit 2e72165
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
20 changes: 13 additions & 7 deletions manifests/fpm.pp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@
# Hash of defaults params php::fpm::pool resources that will be created.
# Defaults is empty hash.
#
# [*pool_purge*]
# Whether to purge pool config files not created
# by this module
#
class php::fpm (
String $ensure = $php::ensure,
$user = $php::fpm_user,
Expand All @@ -64,6 +68,7 @@
Hash $pools = $php::real_fpm_pools,
$log_owner = $php::log_owner,
$log_group = $php::log_group,
Boolean $pool_purge = $php::pool_purge,
) {

if ! defined(Class['php']) {
Expand All @@ -85,13 +90,14 @@
}

class { 'php::fpm::config':
user => $user,
group => $group,
inifile => $inifile,
settings => $real_settings,
log_owner => $log_owner,
log_group => $log_group,
require => Package[$real_package],
user => $user,
group => $group,
inifile => $inifile,
settings => $real_settings,
log_owner => $log_owner,
log_group => $log_group,
pool_purge => $pool_purge,
require => Package[$real_package],
}

contain 'php::fpm::config'
Expand Down
5 changes: 5 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@
# For example, 'PHP/memory_limit' => '1000M' sets memory_limit to 1000M
# for the PHP cli ini file, regardless of the values from $settings.
#
# [*pool_purge*]
# Whether to purge pool config files not created
# by this module
#
class php (
String $ensure = $php::params::ensure,
Boolean $manage_repos = $php::params::manage_repos,
Expand Down Expand Up @@ -157,6 +161,7 @@
Boolean $ext_tool_enabled = $php::params::ext_tool_enabled,
String $log_owner = $php::params::fpm_user,
String $log_group = $php::params::fpm_group,
Boolean $pool_purge = $php::params::pool_purge,
) inherits php::params {

$real_fpm_package = pick($fpm_package, "${package_prefix}${::php::params::fpm_package_suffix}")
Expand Down
1 change: 1 addition & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
$phpunit_source = 'https://phar.phpunit.de/phpunit.phar'
$phpunit_path = '/usr/local/bin/phpunit'
$phpunit_max_age = 30
$pool_purge = false

case $facts['os']['family'] {
'Debian': {
Expand Down

0 comments on commit 2e72165

Please sign in to comment.