File tree Expand file tree Collapse file tree 4 files changed +4
-37
lines changed Expand file tree Collapse file tree 4 files changed +4
-37
lines changed Original file line number Diff line number Diff line change 111111 ' log_user' => ' http' ,
112112 ' log_group' => ' log' ,
113113 ' package_name' => ' nginx-mainline' ,
114- ' mail_package_name' => ' nginx-mod-mail' ,
114+ ' mail_package_name' => ' nginx-mainline- mod-mail' ,
115115 }
116116 }
117117 ' Debian' : {
Original file line number Diff line number Diff line change 187187) {
188188 if ! defined (Class[' nginx' ]) {
189189 fail(' You must include the nginx base class before using any defined resources' )
190+ } elsif versioncmp($facts .get(' nginx_version' , $nginx::nginx_version ), ' 1.15.0' ) < 0 {
191+ fail(' This module does not support nginx 1.14' )
190192 }
191193 if $nginx::mail_package_name {
192194 package { $nginx::mail_package_name :
Original file line number Diff line number Diff line change @@ -65,37 +65,5 @@ class { 'nginx':
6565 describe port ( 465 ) do
6666 it { is_expected . to be_listening }
6767 end
68-
69- context 'when configured for nginx 1.14' , if : !%w[ Debian Archlinux ] . include? ( fact ( 'os.family' ) ) do
70- shell ( 'yum -y install nginx-1.14.1' ) if fact ( 'os.family' ) == 'RedHat' && fact ( 'os.release.major' ) == '8'
71- it 'runs successfully' do
72- pp = "
73- class { 'nginx':
74- mail => true,
75- manage_repo => false,
76- nginx_version => '1.14.0',
77- }
78- nginx::resource::mailhost { 'domain1.example':
79- ensure => present,
80- auth_http => 'localhost/cgi-bin/auth',
81- protocol => 'smtp',
82- listen_port => 587,
83- ssl => true,
84- ssl_port => 465,
85- ssl_cert => '/etc/pki/tls/certs/blah.cert',
86- ssl_key => '/etc/pki/tls/private/blah.key',
87- xclient => 'off',
88- }
89- "
90-
91- apply_manifest ( pp , catch_failures : true )
92- end
93-
94- describe file ( '/etc/nginx/conf.mail.d/domain1.example.conf' ) do
95- it 'does\'t contain `ssl` on `listen` line' do
96- is_expected . to contain 'listen *:465;'
97- end
98- end
99- end
10068 end
10169end
Original file line number Diff line number Diff line change 1414server {
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 -%>
You can’t perform that action at this time.
0 commit comments