aboutsummaryrefslogtreecommitdiff
path: root/manifests/fpm/pool.pp
blob: b7895a4a1d9e01f3c01ae6fc1e1b4ae6710a99f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
define php::fpm::pool(
  $source,
  $series = '7',
  $ensure = 'present',
) {
  if $series == '5' {
    $version = $::php::series5::version
    $folder  = $::php::series5::folder
  }
  else {
    $version = $::php::series7::version
    $folder  = $::php::series7::folder
  }

  file { "/etc/php/${version}/fpm/pool.d/${name}.conf":
    ensure  => $ensure,
    source  => $source,
    require => Package["php${version}-fpm"],
    notify  => Service["php${version}-fpm"],
  }
}