Skip to content

Commit

Permalink
Merge 8b1fd87 into d7bcc0a
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed Aug 1, 2020
2 parents d7bcc0a + 8b1fd87 commit 73e69af
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 58 deletions.
2 changes: 1 addition & 1 deletion manifests/dev.pp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
}

# Default PHP come with xml module and no seperate package for it
if $facts['os']['name'] == 'Ubuntu' and versioncmp($facts['os']['release']['full'], '16.04') >= 0 {
if $facts['os']['name'] == 'Ubuntu' {
ensure_packages(["${php::package_prefix}xml"], { ensure => present, require => $require, })
}
package { $real_package:
Expand Down
15 changes: 0 additions & 15 deletions manifests/fpm.pp
Original file line number Diff line number Diff line change
Expand Up @@ -107,19 +107,4 @@
$real_global_pool_settings = $global_pool_settings
$real_pools = $pools
create_resources(::php::fpm::pool, $real_pools, $real_global_pool_settings)

# Create an override to use a reload signal as trusty and utopic's
# upstart version supports this
if ($facts['os']['name'] == 'Ubuntu' and versioncmp($facts['os']['release']['full'], '14') >= 0 and versioncmp($facts['os']['release']['full'], '16') < 0) {
if ($service_enable) {
$fpm_override = 'reload signal USR2'
}
else {
$fpm_override = "reload signal USR2\nmanual"
}
file { "/etc/init/${php::fpm::service::service_name}.override":
content => $fpm_override,
before => Package[$real_package],
}
}
}
12 changes: 1 addition & 11 deletions manifests/fpm/service.pp
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,7 @@
warning('php::fpm::service is private')
}

$reload = "service ${service_name} reload"

if ($facts['os']['name'] == 'Ubuntu'
and versioncmp($facts['os']['release']['full'], '12') >= 0
and versioncmp($facts['os']['release']['full'], '14') < 0) {
# Precise upstart doesn't support reload signals, so use
# regular service restart instead
$restart = undef
} else {
$restart = $reload
}
$restart = "service ${service_name} reload"

service { $service_name:
ensure => $ensure,
Expand Down
15 changes: 2 additions & 13 deletions manifests/globals.pp
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,11 @@
$default_php_version = $facts['os']['name'] ? {
'Debian' => $facts['os']['release']['major'] ? {
'9' => '7.0',
'10' => '7.3',
default => '5.x',
default => '7.3',
},
'Ubuntu' => $facts['os']['release']['major'] ? {
'18.04' => '7.2',
'16.04' => '7.0',
default => '5.x',
default => '7.2',
},
default => '5.x',
}
Expand All @@ -45,15 +43,6 @@
'Debian': {
if $facts['os']['name'] == 'Ubuntu' {
case $globals_php_version {
/^5\.4/: {
$default_config_root = '/etc/php5'
$default_fpm_pid_file = "/var/run/php/php${globals_php_version}-fpm.pid"
$fpm_error_log = '/var/log/php5-fpm.log'
$fpm_service_name = 'php5-fpm'
$ext_tool_enable = '/usr/sbin/php5enmod'
$ext_tool_query = '/usr/sbin/php5query'
$package_prefix = 'php5-'
}
/^[57].[0-9]/: {
$default_config_root = "/etc/php/${globals_php_version}"
$default_fpm_pid_file = "/var/run/php/php${globals_php_version}-fpm.pid"
Expand Down
18 changes: 1 addition & 17 deletions manifests/repo/debian.pp
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,7 @@
key => $key,
}

if ($dotdeb) {
# both repositories are required to work correctly
# See: http://www.dotdeb.org/instructions/
if $release == 'wheezy-php56' {
apt::source { 'dotdeb-wheezy':
location => $location,
release => 'wheezy',
repos => $repos,
include => {
'src' => $include_src,
'deb' => true,
},
}
}
}

if ($sury and $php::globals::php_version in ['5.6','7.1','7.2']) {
if ($sury and $php::globals::php_version in ['7.1','7.2']) {
apt::source { 'source_php_sury':
location => 'https://packages.sury.org/php/',
repos => 'main',
Expand Down
1 change: 0 additions & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
{
"operatingsystem": "Debian",
"operatingsystemrelease": [
"8",
"9",
"10"
]
Expand Down

0 comments on commit 73e69af

Please sign in to comment.