Skip to content

Commit 81f29b6

Browse files
committed
Merge Debian and Ubuntu configs where possible
1 parent 63b760f commit 81f29b6

File tree

1 file changed

+3
-31
lines changed

1 file changed

+3
-31
lines changed

manifests/params.pp

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -361,10 +361,11 @@
361361
'wsgi' => 'libapache2-mod-wsgi',
362362
'xsendfile' => 'libapache2-mod-xsendfile',
363363
}
364-
} elsif ($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '9') >= 0) {
364+
} elsif ($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '9') >= 0) or ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '18.04') >= 0) {
365365
$php_version = $facts['operatingsystemmajrelease'] ? {
366366
'9' => '7.0', # Debian Stretch
367367
'10' => '7.3', # Debian Buster
368+
default => '7.2', # Ubuntu Bionic, Cosmic and Disco
368369
}
369370
$mod_packages = {
370371
'auth_cas' => 'libapache2-mod-auth-cas',
@@ -374,35 +375,6 @@
374375
'authnz_pam' => 'libapache2-mod-authnz-pam',
375376
'dav_svn' => 'libapache2-mod-svn',
376377
'fastcgi' => 'libapache2-mod-fastcgi',
377-
'fcgid' => 'libapache2-mod-fcgid',
378-
'geoip' => 'libapache2-mod-geoip',
379-
'intercept_form_submit' => 'libapache2-mod-intercept-form-submit',
380-
'lookup_identity' => 'libapache2-mod-lookup-identity',
381-
'nss' => 'libapache2-mod-nss',
382-
'pagespeed' => 'mod-pagespeed-stable',
383-
'passenger' => 'libapache2-mod-passenger',
384-
'perl' => 'libapache2-mod-perl2',
385-
'phpXXX' => 'libapache2-mod-phpXXX',
386-
'python' => 'libapache2-mod-python',
387-
'rpaf' => 'libapache2-mod-rpaf',
388-
'security' => 'libapache2-mod-security2',
389-
'shib2' => 'libapache2-mod-shib2',
390-
'suphp' => 'libapache2-mod-suphp',
391-
'wsgi' => 'libapache2-mod-wsgi',
392-
'xsendfile' => 'libapache2-mod-xsendfile',
393-
}
394-
} elsif ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '18.04') >= 0) {
395-
# major.minor version used since Debian stretch and Ubuntu Xenial
396-
$php_version = '7.2' # different to Ubuntu 16.04
397-
# fastcgi and suphp got removed from #mod_packages, they aren't supported anymore
398-
$mod_packages = {
399-
'auth_cas' => 'libapache2-mod-auth-cas',
400-
'auth_kerb' => 'libapache2-mod-auth-kerb',
401-
'auth_gssapi' => 'libapache2-mod-auth-gssapi',
402-
'auth_mellon' => 'libapache2-mod-auth-mellon',
403-
'authnz_pam' => 'libapache2-mod-authnz-pam',
404-
'dav_svn' => 'libapache2-mod-svn', # different to Ubuntu16.04
405-
'fcgid' => 'libapache2-mod-fcgid',
406378
'geoip' => 'libapache2-mod-geoip',
407379
'intercept_form_submit' => 'libapache2-mod-intercept-form-submit',
408380
'lookup_identity' => 'libapache2-mod-lookup-identity',
@@ -419,7 +391,7 @@
419391
'xsendfile' => 'libapache2-mod-xsendfile',
420392
}
421393
} else {
422-
# major.minor version used since Debian stretch and Ubuntu Xenial
394+
# Ubuntu Xenial
423395
$php_version = '7.0'
424396
$mod_packages = {
425397
'auth_cas' => 'libapache2-mod-auth-cas',

0 commit comments

Comments
 (0)