File tree Expand file tree Collapse file tree 4 files changed +16
-3
lines changed Expand file tree Collapse file tree 4 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -258,7 +258,8 @@ The following parameters are available in the `nginx` class:
258
258
Data type: ` Boolean `
259
259
260
260
When set, nginx will include module configurations files installed in the
261
- /etc/nginx/modules-enabled directory.
261
+ /etc/nginx/modules-enabled directory. This is also enabled if mail is
262
+ being configured (to allow the module to be loaded).
262
263
263
264
Default value: ` $nginx::params::include_modules_enabled `
264
265
Original file line number Diff line number Diff line change 10
10
#
11
11
# @param include_modules_enabled
12
12
# When set, nginx will include module configurations files installed in the
13
- # /etc/nginx/modules-enabled directory.
13
+ # /etc/nginx/modules-enabled directory. This is also enabled if mail is
14
+ # being configured (to allow the module to be loaded).
14
15
#
15
16
# @param passenger_package_name
16
17
# The name of the package to install in order for the passenger module of
Original file line number Diff line number Diff line change 194
194
package { $nginx::mail_package_name :
195
195
ensure => ' installed' ,
196
196
}
197
+ $mail_load_content = $facts [' os' ][' family' ] ? {
198
+ ' ArchLinux' => ' load_module /usr/lib/nginx/modules/ngx_mail_module.so;' ,
199
+ ' RedHat' => ' load_module /usr/lib64/nginx/modules/ngx_mail_module.so;' ,
200
+ }
201
+ file { '/etc/nginx/modules-enabled/mail.conf' :
202
+ ensure => ' file' ,
203
+ owner => ' root' ,
204
+ mode => ' 0644' ,
205
+ content => $mail_load_content ,
206
+ }
197
207
}
198
208
199
209
# Add IPv6 Logic Check - Nginx service will not start if ipv6 is enabled
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ load_module "<%= mod_item -%>";
6
6
load_module "modules/<%= mod_item -%> .so";
7
7
<%- end -%>
8
8
<%- end -%>
9
+
9
10
<% if @daemon -%>
10
11
daemon <%= @daemon %> ;
11
12
<% end -%>
@@ -23,7 +24,7 @@ pcre_jit <%= @pcre_jit %>;
23
24
<% if @pid -%>
24
25
pid <%= @pid %> ;
25
26
<% end -%>
26
- <% if @include_modules_enabled -%>
27
+ <% if @include_modules_enabled or @mail -%>
27
28
include /etc/nginx/modules-enabled/*.conf;
28
29
<% end -%>
29
30
<% if @nginx_cfg_prepend -%>
You can’t perform that action at this time.
0 commit comments