1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
define php::fpm(
$series,
$ensure = 'present',
) {
if $series == '5' {
$version = $::php::params::version5
$folder = $::php::series5::folder
}
else {
$version = $::php::params::version7
$folder = $::php::series7::folder
}
package { "php${version}-fpm":
ensure => $ensure,
}
if $ensure == 'present' {
service { "php${version}-fpm":
ensure => running,
require => Package["php${version}-fpm"],
}
}
#apache::module { [ "proxy_fcgi", "setenvif" ]:
# #ensure => $ensure,
# ensure => present,
# require => Package["apache"],
#}
file { [ "${folder}/fpm", "${folder}/fpm/conf.d" ]:
ensure => $ensure ? {
'present' => directory,
default => undef,
},
require => Package["php${version}-fpm"],
}
}
|