Skip to content

Commit 39ab158

Browse files
committed
drop support for versions < 1.15.0
1 parent 7f3a8ae commit 39ab158

File tree

5 files changed

+1
-56
lines changed

5 files changed

+1
-56
lines changed

spec/acceptance/nginx_mail_spec.rb

-40
Original file line numberDiff line numberDiff line change
@@ -79,45 +79,5 @@ class { 'nginx':
7979
describe port(465) do
8080
it { is_expected.to be_listening }
8181
end
82-
83-
context 'when configured for nginx 1.14' do
84-
it 'runs successfully' do
85-
pp = "
86-
if fact('os.family') == 'RedHat' {
87-
package { 'nginx-mod-mail':
88-
ensure => installed,
89-
}
90-
}
91-
92-
class { 'nginx':
93-
mail => true,
94-
nginx_version => '1.14.0',
95-
dynamic_modules => fact('os.family') ? {
96-
'RedHat' => ['/usr/lib64/nginx/modules/ngx_mail_module.so'],
97-
default => [],
98-
}
99-
}
100-
nginx::resource::mailhost { 'domain1.example':
101-
ensure => present,
102-
auth_http => 'localhost/cgi-bin/auth',
103-
protocol => 'smtp',
104-
listen_port => 587,
105-
ssl => true,
106-
ssl_port => 465,
107-
ssl_cert => '/etc/pki/tls/certs/blah.cert',
108-
ssl_key => '/etc/pki/tls/private/blah.key',
109-
xclient => 'off',
110-
}
111-
"
112-
113-
apply_manifest(pp, catch_failures: true)
114-
end
115-
116-
describe file('/etc/nginx/conf.mail.d/domain1.example.conf') do
117-
it 'does\'t contain `ssl` on `listen` line' do
118-
is_expected.to contain 'listen *:465;'
119-
end
120-
end
121-
end
12282
end
12383
end

spec/defines/resource_server_spec.rb

-6
Original file line numberDiff line numberDiff line change
@@ -675,12 +675,6 @@
675675
it { is_expected.to contain_concat__fragment("#{title}-ssl-header").with_content(%r{ ssl on;}) }
676676
end
677677

678-
context 'with fact nginx_version=1.14.1' do
679-
let(:facts) { facts.merge(nginx_version: '1.14.1') }
680-
681-
it { is_expected.to contain_concat__fragment("#{title}-ssl-header").with_content(%r{ ssl on;}) }
682-
end
683-
684678
context 'with fact nginx_version=1.15.1' do
685679
let(:facts) { facts.merge(nginx_version: '1.15.1') }
686680

templates/mailhost/mailhost.epp

-3
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ server {
2323
<%- } -%>
2424
<%= $mailhost_common -%>
2525

26-
<%- if versioncmp($nginx_version, '1.15.0') < 0 { -%>
27-
ssl off;
28-
<% } %>
2926
starttls <%= $starttls %>;
3027

3128
<% if $starttls != 'off' { %>

templates/mailhost/mailhost_ssl.epp

+1-4
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,13 @@
1414
server {
1515
<%= $mailhost_prepend -%>
1616
<%- $listen_ip.each |$ip| { -%>
17-
listen <%= $ip %>:<%= $ssl_port %><% if versioncmp($nginx_version, '1.15.0') >= 0 { %> ssl<% } %>;
17+
listen <%= $ip %>:<%= $ssl_port %> ssl;
1818
<%- } -%>
1919
<%- $ipv6_listen_ip.each |$ipv6| { -%>
2020
listen [<%= $ipv6 %>]:<%= $ssl_port %> <% if $ipv6_listen_options { %><%= $ipv6_listen_options %><% } %>;
2121
<%- } -%>
2222
<%= $mailhost_common -%>
2323

24-
<%- if versioncmp($nginx_version, '1.15.0') < 0 { -%>
25-
ssl on;
26-
<% } %>
2724
starttls off;
2825

2926
<%= $mailhost_ssl_settings -%>

templates/server/server_ssl_settings.erb

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
<% if scope.call_function('versioncmp', [scope['nginx::nginx_version'], '1.15.0']) < 0 -%>
2-
ssl on;
3-
<% end -%>
41
<% if scope.call_function('versioncmp', [scope['nginx::nginx_version'], '1.25.1']) >= 0 && @http2 -%>
52
http2 <%= @http2 %>;
63
<% end -%>

0 commit comments

Comments
 (0)