Skip to content

Commit

Permalink
(IAC-1721) - Various fixes
Browse files Browse the repository at this point in the history
- set php version to default to `7.4` on Deb11
- set param `wsgi` to `libapache2-mod-wsgi-py3` for Deb11, Python 2 is not supported
- set param `shib2` to `libapache2-mod-shib` for Deb11, `libapache2-mod-shib2` seems to have been discontinued going forward.
- ensure `ipv6` is enabled on Deb11 boxes
  • Loading branch information
david22swan committed Aug 10, 2021
1 parent c40595c commit f4e8c1d
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
33 changes: 32 additions & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@
'wsgi' => 'libapache2-mod-wsgi',
'xsendfile' => 'libapache2-mod-xsendfile',
}
} else {
} elsif ($::operatingsystem == 'Ubuntu') or ($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '11') < 0) {
$php_version = $facts['operatingsystemmajrelease'] ? {
'9' => '7.0', # Debian Stretch
'16.04' => '7.0', # Ubuntu Xenial
Expand Down Expand Up @@ -427,6 +427,37 @@
'wsgi' => 'libapache2-mod-wsgi',
'xsendfile' => 'libapache2-mod-xsendfile',
}
} else {
$php_version = $facts['operatingsystemmajrelease'] ? {
default => '7.4', # Debian Bullseye
}
$mod_packages = {
'apreq2' => 'libapache2-mod-apreq2',
'auth_cas' => 'libapache2-mod-auth-cas',
'auth_kerb' => 'libapache2-mod-auth-kerb',
'auth_openidc' => 'libapache2-mod-auth-openidc',
'auth_gssapi' => 'libapache2-mod-auth-gssapi',
'auth_mellon' => 'libapache2-mod-auth-mellon',
'authnz_pam' => 'libapache2-mod-authnz-pam',
'dav_svn' => 'libapache2-mod-svn',
'fastcgi' => 'libapache2-mod-fastcgi',
'fcgid' => 'libapache2-mod-fcgid',
'geoip' => 'libapache2-mod-geoip',
'intercept_form_submit' => 'libapache2-mod-intercept-form-submit',
'jk' => 'libapache2-mod-jk',
'lookup_identity' => 'libapache2-mod-lookup-identity',
'nss' => 'libapache2-mod-nss',
'pagespeed' => 'mod-pagespeed-stable',
'passenger' => 'libapache2-mod-passenger',
'perl' => 'libapache2-mod-perl2',
'phpXXX' => 'libapache2-mod-phpXXX',
'python' => 'libapache2-mod-python',
'rpaf' => 'libapache2-mod-rpaf',
'security' => 'libapache2-mod-security2',
'shib2' => 'libapache2-mod-shib',
'wsgi' => 'libapache2-mod-wsgi-py3',
'xsendfile' => 'libapache2-mod-xsendfile',
}
}
$error_log = 'error.log'
$scriptalias = '/usr/lib/cgi-bin'
Expand Down
4 changes: 4 additions & 0 deletions spec/acceptance/mod_php_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ class { 'apache::mod::php': }
describe file("#{apache_hash['mod_dir']}/php7.3.conf") do
it { is_expected.to contain 'DirectoryIndex index.php' }
end
elsif os[:family] == 'debian' && os[:release] =~ %r{^11\.}
describe file("#{apache_hash['mod_dir']}/php7.4.conf") do
it { is_expected.to contain 'DirectoryIndex index.php' }
end
elsif os[:family] == 'ubuntu' && os[:release] == '18.04'
describe file("#{apache_hash['mod_dir']}/php7.2.conf") do
it { is_expected.to contain 'DirectoryIndex index.php' }
Expand Down
3 changes: 3 additions & 0 deletions spec/spec_helper_acceptance_local.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ class { 'epel': }
}
PUPPETCODE
LitmusHelper.instance.apply_manifest(pp)

# Ensure ipv6 is enabled on our Debian 11 Docker boxes
LitmusHelper.instance.run_shell('sysctl -w net.ipv6.conf.all.disable_ipv6=0') if %r{debian}.match?(os[:family]) && os[:release].to_f == 11
end

c.after :suite do
Expand Down

0 comments on commit f4e8c1d

Please sign in to comment.