Skip to content

Commit b3f5f8c

Browse files
authored
Merge pull request #2481 from bastelfreak/eol
Drop EoL Ubuntu code
2 parents 8f44e53 + 4ec2f4e commit b3f5f8c

File tree

5 files changed

+5
-54
lines changed

5 files changed

+5
-54
lines changed

REFERENCE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3602,7 +3602,7 @@ Installs `mod_macro`.
36023602

36033603
Installs and configures `mod_md`.
36043604

3605-
* **Note** Unsupported platforms: CentOS: 6, 7; OracleLinux: all; RedHat: 6, 7; Scientific: all; SLES: all; Ubuntu: 14, 16, 18
3605+
* **Note** Unsupported platforms: CentOS: 6, 7; OracleLinux: all; RedHat: 6, 7; Scientific: all; SLES: all; Ubuntu: 18
36063606

36073607
* **See also**
36083608
* https://httpd.apache.org/docs/current/mod/mod_md.html

manifests/mod/md.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
#
9292
# @see https://httpd.apache.org/docs/current/mod/mod_md.html for additional documentation.
9393
#
94-
# @note Unsupported platforms: CentOS: 6, 7; OracleLinux: all; RedHat: 6, 7; Scientific: all; SLES: all; Ubuntu: 14, 16, 18
94+
# @note Unsupported platforms: CentOS: 6, 7; OracleLinux: all; RedHat: 6, 7; Scientific: all; SLES: all; Ubuntu: 18
9595
class apache::mod::md (
9696
Optional[String] $md_activation_delay = undef,
9797
Optional[Apache::OnOff] $md_base_server = undef,

spec/classes/mod/php_spec.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,8 @@
290290
end
291291

292292
# all the following tests are for legacy php/apache versions. They don't work on modern ubuntu and redhat 8
293-
next if (facts[:os]['release']['major'].to_i > 15 && facts[:os]['name'] == 'Ubuntu') ||
294-
(facts[:os]['release']['major'].to_i >= 15 && facts[:os]['name'] == 'SLES') ||
295-
(facts[:os]['name'] == 'Debian') ||
293+
next if (facts[:os]['release']['major'].to_i >= 15 && facts[:os]['name'] == 'SLES') ||
294+
(facts[:os]['family'] == 'Debian') ||
296295
(facts[:os]['release']['major'].to_i >= 8 && (facts[:os]['name'] == 'RedHat' || facts[:os]['name'] == 'CentOS' ||
297296
facts[:os]['name'] == 'Rocky' || facts[:os]['name'] == 'AlmaLinux'))
298297

spec/classes/mod/security_spec.rb

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -286,54 +286,6 @@
286286
)
287287
}
288288

289-
if facts[:os]['release']['major'].to_i < 18 && facts[:os]['name'] == 'Ubuntu'
290-
it { is_expected.to contain_apache__security__rule_link('base_rules/modsecurity_35_bad_robots.data') }
291-
292-
it {
293-
expect(subject).to contain_file('modsecurity_35_bad_robots.data').with(
294-
path: '/etc/modsecurity/activated_rules/modsecurity_35_bad_robots.data',
295-
target: '/usr/share/modsecurity-crs/base_rules/modsecurity_35_bad_robots.data',
296-
)
297-
}
298-
end
299-
300-
describe 'with parameters' do
301-
let :params do
302-
{
303-
activated_rules: [
304-
'/tmp/foo/bar.conf',
305-
],
306-
audit_log_relevant_status: '^(?:5|4(?!01|04))',
307-
audit_log_parts: 'ABCDZ',
308-
audit_log_type: 'Concurrent',
309-
audit_log_storage_dir: '/var/log/httpd/audit',
310-
secdefaultaction: 'deny,status:406,nolog,auditlog',
311-
secrequestbodyaccess: 'Off',
312-
secresponsebodyaccess: 'On',
313-
secrequestbodylimitaction: 'ProcessPartial',
314-
secresponsebodylimitaction: 'Reject'
315-
}
316-
end
317-
318-
if facts[:os]['release']['major'].to_i < 18 && facts[:os]['name'] == 'Ubuntu'
319-
it { is_expected.to contain_file('security.conf').with_content %r{^\s+SecAuditLogRelevantStatus "\^\(\?:5\|4\(\?!01\|04\)\)"$} }
320-
it { is_expected.to contain_file('security.conf').with_content %r{^\s+SecAuditLogParts ABCDZ$} }
321-
it { is_expected.to contain_file('security.conf').with_content %r{^\s+SecAuditLogStorageDir /var/log/httpd/audit$} }
322-
it { is_expected.to contain_file('security.conf').with_content %r{^\s+SecRequestBodyAccess Off$} }
323-
it { is_expected.to contain_file('security.conf').with_content %r{^\s+SecResponseBodyAccess On$} }
324-
it { is_expected.to contain_file('security.conf').with_content %r{^\s+SecRequestBodyLimitAction ProcessPartial$} }
325-
it { is_expected.to contain_file('security.conf').with_content %r{^\s+SecResponseBodyLimitAction Reject$} }
326-
it { is_expected.to contain_file('/etc/modsecurity/security_crs.conf').with_content %r{^\s*SecDefaultAction "phase:2,deny,status:406,nolog,auditlog"$} }
327-
328-
it {
329-
expect(subject).to contain_file('bar.conf').with(
330-
path: '/etc/modsecurity/activated_rules/bar.conf',
331-
target: '/tmp/foo/bar.conf',
332-
)
333-
}
334-
end
335-
end
336-
337289
describe 'with custom parameters' do
338290
let :params do
339291
{

spec/defines/vhost_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@
593593
'notify' => 'Class[Apache::Service]')
594594
}
595595

596-
if os_facts[:os]['release']['major'].to_i >= 18 && os_facts[:os]['name'] == 'Ubuntu'
596+
if os_facts[:os]['name'] == 'Ubuntu'
597597
it {
598598
expect(subject).to contain_file('30-rspec.example.com.conf symlink').with('ensure' => 'link',
599599
'path' => "/etc/#{apache_name}/sites-enabled/30-rspec.example.com.conf")

0 commit comments

Comments
 (0)