Skip to content

Commit 30f87bf

Browse files
committed
(MODULES-8107) - Support added for Ubuntu 18.04.
PR made to finialize work started by community member bastelfreak, (#1809). Includes work done to migrate spec classes tests to rspec-puppet-facts.
1 parent b41a0ff commit 30f87bf

23 files changed

+3195
-3858
lines changed

manifests/mod/dav_svn.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
::apache::mod { 'dav_svn': }
1515

16-
if $::osfamily == 'Debian' and ! ($::operatingsystemmajrelease in ['6', '16.04', '9']) {
16+
if $::osfamily == 'Debian' and ! ($::operatingsystemmajrelease in ['6', '9', '16.04', '18.04']) {
1717
$loadfile_name = undef
1818
} else {
1919
$loadfile_name = 'dav_svn_authz_svn.load'

manifests/mod/fastcgi.pp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
if ($::osfamily == 'Redhat' and versioncmp($::operatingsystemrelease, '7.0') >= 0) {
44
fail('mod_fastcgi is no longer supported on el7 and above.')
55
}
6+
if ($facts['os']['name'] == 'Ubuntu' and versioncmp($facts['os']['release']['major'], '18.04') >= 0) {
7+
fail('mod_fastcgi is no longer supported on Ubuntu 18.04 and above. Please use mod_proxy_fcgi')
8+
}
69
# Debian specifies it's fastcgi lib path, but RedHat uses the default value
710
# with no config file
811
$fastcgi_lib_path = $::apache::params::fastcgi_lib_path

manifests/mod/security.pp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,7 @@
129129
}
130130

131131
# Debian 9 has a different rule setup
132-
unless $::operatingsystem == 'SLES' or ($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '9') >= 0) {
132+
unless $::operatingsystem == 'SLES' or ($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '9') >= 0) or ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '18.04') >= 0) {
133133
apache::security::rule_link { $activated_rules: }
134134
}
135-
136135
}

manifests/mod/suphp.pp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
class apache::mod::suphp (
22
){
3+
if ($facts['os']['name'] == 'Ubuntu' and versioncmp($facts['os']['release']['major'], '15.10') >= 0) or
4+
($facts['os']['name'] == 'Debian' and versioncmp($::operatingsystemrelease, '8') >= 0) {
5+
fail("suphp was declared EOL by it's creators as of 2013 and so is no longer supported on Ubuntu 15.10/Debian 8 and above. Please use php-fpm")
6+
}
37
include ::apache
48
::apache::mod { 'suphp': }
59

manifests/mpm.pp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@
8282
}
8383

8484
if $mpm == 'itk' {
85-
8685
if ( ( $::operatingsystem == 'Ubuntu' ) or ( ($::operatingsystem == 'Debian') and ( versioncmp($::operatingsystemrelease, '8.0.0') >= 0 ) ) ) {
8786
ensure_resource('exec', '/usr/sbin/a2dismod mpm_event', {
8887
onlyif => "/usr/bin/test -e ${apache::mod_enable_dir}/mpm_event.load",
@@ -98,7 +97,6 @@
9897
File[$::apache::mod_enable_dir],
9998
],
10099
}
101-
102100
}
103101

104102
if $mpm == 'prefork' {

manifests/params.pp

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,33 @@
291291
'wsgi' => 'libapache2-mod-wsgi',
292292
'xsendfile' => 'libapache2-mod-xsendfile',
293293
}
294+
} elsif ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '18.04') >= 0) {
295+
# major.minor version used since Debian stretch and Ubuntu Xenial
296+
$php_version = '7.2' # different to Ubuntu 16.04
297+
# fastcgi and suphp got removed from #mod_packages, they aren't supported anymore
298+
$mod_packages = {
299+
'auth_cas' => 'libapache2-mod-auth-cas',
300+
'auth_kerb' => 'libapache2-mod-auth-kerb',
301+
'auth_gssapi' => 'libapache2-mod-auth-gssapi',
302+
'auth_mellon' => 'libapache2-mod-auth-mellon',
303+
'authnz_pam' => 'libapache2-mod-authnz-pam',
304+
'dav_svn' => 'libapache2-mod-svn', # different to Ubuntu16.04
305+
'fcgid' => 'libapache2-mod-fcgid',
306+
'geoip' => 'libapache2-mod-geoip',
307+
'intercept_form_submit' => 'libapache2-mod-intercept-form-submit',
308+
'lookup_identity' => 'libapache2-mod-lookup-identity',
309+
'nss' => 'libapache2-mod-nss',
310+
'pagespeed' => 'mod-pagespeed-stable',
311+
'passenger' => 'libapache2-mod-passenger',
312+
'perl' => 'libapache2-mod-perl2',
313+
'phpXXX' => 'libapache2-mod-phpXXX',
314+
'python' => 'libapache2-mod-python',
315+
'rpaf' => 'libapache2-mod-rpaf',
316+
'security' => 'libapache2-mod-security2',
317+
'shib2' => 'libapache2-mod-shib2',
318+
'wsgi' => 'libapache2-mod-wsgi',
319+
'xsendfile' => 'libapache2-mod-xsendfile',
320+
}
294321
} else {
295322
# major.minor version used since Debian stretch and Ubuntu Xenial
296323
$php_version = '7.0'
@@ -354,7 +381,7 @@
354381
$secpcrematchlimit = 1500
355382
$secpcrematchlimitrecursion = 1500
356383
$modsec_secruleengine = 'On'
357-
if $::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '9') >= 0 {
384+
if ($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '9') >= 0) or ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '18.04') >= 0) {
358385
$modsec_default_rules = [
359386
'crawlers-user-agents.data',
360387
'iis-errors.data',

metadata.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@
6565
{
6666
"operatingsystem": "Ubuntu",
6767
"operatingsystemrelease": [
68-
"14.04",
69-
"16.04"
68+
"16.04",
69+
"18.04"
7070
]
7171
}
7272
],

0 commit comments

Comments
 (0)