Skip to content
This repository has been archived by the owner on Oct 11, 2018. It is now read-only.

Commit

Permalink
Merge pull request #167 from skrivy/master
Browse files Browse the repository at this point in the history
#163 Added ability to purge fpm pools
  • Loading branch information
jippi committed Apr 11, 2017
2 parents 59760d6 + f74d561 commit ebc8524
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
19 changes: 16 additions & 3 deletions manifests/fpm.pp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
# Hash with 'set' nested hash of key => value
# set changes to agues when applied to *inifile*
#
# [*purge_pools*]
# When true, purges all pool files which are not managed by puppet
#
# === Variables
#
# No variables
Expand Down Expand Up @@ -66,6 +69,8 @@
$rlimit_core = $php::fpm::params::rlimit_core,
$events_mechanism = $php::fpm::params::events_mechanism,

$purge_pools = $php::fpm::params::purge_pools,

) inherits php::fpm::params {

class { 'php::fpm::package':
Expand All @@ -84,10 +89,10 @@
}

php::fpm::config { 'php-fpm':
file => $inifile,
config => $settings,
file => $inifile,
config => $settings,
service_name => $service_name,
require => Package[$package]
require => Package[$package]
}

file { '/etc/php5/fpm/php-fpm.conf':
Expand All @@ -99,4 +104,12 @@
require => Package[$package]
}

if ($purge_pools) {
file { "/etc/php5/fpm/pool.d/":
recurse => true,
purge => true,
require => Package[$package]
}
}

}
4 changes: 4 additions & 0 deletions manifests/fpm/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
# Hash with 'set' nested hash of key => value
# set changes to agues when applied to *inifile*
#
# [*purge_pools*]
# When true, purges all pool files which are not managed by puppet
#
# === Examples
#
# No examples
Expand Down Expand Up @@ -68,4 +71,5 @@
$rlimit_core = 0
$events_mechanism = undef

$purge_pools = false
}

0 comments on commit ebc8524

Please sign in to comment.