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
39
40
41
42
43
44
45
46
47
48
49
50
|
class php::series7(
$hardened = true,
$manage_mod_php = false,
) {
case $::lsbdistcodename {
'xenial': {
include php::ppa
}
'trusty': {
include php::ppa
}
'stretch': {
include php::dpa
}
}
$version = $::php::params::version7
$folder = "/etc/php/${version}"
include php::series7::packages
include php::resources
include php::series7::defaults
if $hardened == true {
include php::series7::hardened
}
# The needed apache modules
if $manage_mod_php == '7' {
$version5 = $::php::params::version5
apache::module { "php${version}":
ensure => present,
require => Package["libapache2-mod-php${version}"],
}
apache::module { "php${version5}":
ensure => absent,
require => Package["libapache2-mod-php${version}"],
}
}
file { [ "${folder}", "${folder}/cli", "${folder}/apache2", "${folder}/cli/conf.d", "${folder}/apache2/conf.d" ]:
ensure => directory,
owner => root,
group => root,
mode => '0755',
require => Package['php'],
}
}
|