Skip to content

Commit

Permalink
fix whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
jay7x committed Jul 14, 2023
1 parent 4bed703 commit d6da550
Show file tree
Hide file tree
Showing 4 changed files with 144 additions and 144 deletions.
98 changes: 49 additions & 49 deletions templates/mailhost/mailhost.epp
Original file line number Diff line number Diff line change
Expand Up @@ -18,72 +18,72 @@
| -%>
# MANAGED BY PUPPET
server {
<% if $mailhost_cfg_prepend { %>
<%- $mailhost_cfg_prepend.keys.sort.each |$key| { %>
<%- $value = $mailhost_cfg_prepend[$key] %>
<%- if $mailhost_cfg_prepend { -%>
<%- $mailhost_cfg_prepend.keys.sort.each |$key| { -%>
<%- $value = $mailhost_cfg_prepend[$key] -%>
<%- if $value =~ Hash { %>
<%- $value.keys.sort.each |$subkey| { %>
<%- $subvalue = $value[$key] %>
<%- [$subvalue].flatten.each |$asubvalue| { %>
<%- $value.keys.sort.each |$subkey| { -%>
<%- $subvalue = $value[$key] -%>
<%- [$subvalue].flatten.each |$asubvalue| { -%>
<%= $key %> <%= $subkey %> <%= $asubvalue %>;
<%- } %>
<%- } %>
<%- } else { %>
<%- [$value].flatten.each |$asubvalue| { %>
<%- } -%>
<%- } -%>
<%- } else { -%>
<%- [$value].flatten.each |$asubvalue| { -%>
<%= $key %> <%= $asubvalue %>;
<%- } %>
<%- } %>
<%- } %>
<% } %>
<% $raw_prepend.each |$line| { %>
<%- } -%>
<%- } -%>
<%- } -%>
<%- } -%>
<%- $raw_prepend.each |$line| { -%>
<%= $line %>
<% } %>
<%- if $listen_ip =~ Array { %>
<%- $listen_ip.each |$ip| { %>
<%- } -%>
<%- if $listen_ip =~ Array { -%>
<%- $listen_ip.each |$ip| { -%>
listen <%= $ip %>:<%= $listen_port %><% if $listen_options { %> <%= $listen_options %><% } %>;
<%- } %>
<%- } else { %>
<%- } -%>
<%- } else { -%>
listen <%= $listen_ip %>:<%= $listen_port %><% if $listen_options { %> <%= $listen_options %><% } %>;
<%- } %>
<%- } -%>
<%# check to see if ipv6 support exists in the kernel before applying -%>
<%# FIXME this logic is duplicated all over the place -%>
<%- if $ipv6_enable and $ipaddress6 { %>
<%- if $ipv6_listen_ip =~ Array { %>
<%- $ipv6_listen_ip.each |$ipv6| { %>
<%- if $ipv6_enable and $ipaddress6 { -%>
<%- if $ipv6_listen_ip =~ Array { -%>
<%- $ipv6_listen_ip.each |$ipv6| { -%>
listen [<%= $ipv6 %>]:<%= $ipv6_listen_port %> <% if $ipv6_listen_options { %><%= $ipv6_listen_options %><% } %>;
<%- } %>
<%- } else { %>
<%- } -%>
<%- } else { -%>
listen [<%= $ipv6_listen_ip %>]:<%= $ipv6_listen_port %> <% if $ipv6_listen_options { %><%= $ipv6_listen_options %><% } %>;
<%- } %>
<%- } %>
<%= $mailhost_common %>
<%- } -%>
<%- } -%>
<%= $mailhost_common -%>

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

<% if $starttls == 'on' or $starttls == 'only' { %>
<%= $mailhost_ssl_settings %>
<%- } %>
<% if $mailhost_cfg_append { %>
<%- $mailhost_cfg_append.keys.sort.each |$key| { %>
<%- $value = $mailhost_cfg_append[$key] %>
<%- if $value =~ Hash { %>
<%- $value.keys.sort.each |$subkey| { %>
<%- $subvalue = $value[$key] %>
<%- [$subvalue].flatten.each |$asubvalue| { %>
<%= $mailhost_ssl_settings -%>
<%- } -%>
<%- if $mailhost_cfg_append { -%>
<%- $mailhost_cfg_append.keys.sort.each |$key| { -%>
<%- $value = $mailhost_cfg_append[$key] -%>
<%- if $value =~ Hash { -%>
<%- $value.keys.sort.each |$subkey| { -%>
<%- $subvalue = $value[$key] -%>
<%- [$subvalue].flatten.each |$asubvalue| { -%>
<%= $key %> <%= $subkey %> <%= $asubvalue %>;
<%- } %>
<%- } %>
<%- } else { %>
<%- [$value].flatten.each |$asubvalue| { %>
<%- } -%>
<%- } -%>
<%- } else { -%>
<%- [$value].flatten.each |$asubvalue| { -%>
<%= $key %> <%= $asubvalue %>;
<%- } %>
<%- } %>
<%- } %>
<% } %>
<% $raw_append.each |$line| { %>
<%- } -%>
<%- } -%>
<%- } -%>
<%- } -%>
<%- $raw_append.each |$line| { -%>
<%= $line %>
<% } %>
<%- } -%>
}
52 changes: 26 additions & 26 deletions templates/mailhost/mailhost_common.epp
Original file line number Diff line number Diff line change
Expand Up @@ -16,45 +16,45 @@
$xclient,
| -%>
server_name <%= $server_name.join(" ") %>;
<% if $protocol { %>
<%- if $protocol { -%>
protocol <%= $protocol %>;
<% } %>
<%- } -%>
xclient <%= $xclient %>;
proxy_protocol <%= $proxy_protocol %>;
proxy_smtp_auth <%= $proxy_smtp_auth %>;
<% if $auth_http { %>
<%- if $auth_http { -%>
auth_http <%= $auth_http %>;
<% } %>
<%- if $auth_http_header { %>
<%- } -%>
<%- if $auth_http_header { -%>
auth_http_header <%= $auth_http_header %>;
<%- } %>
<%- } -%>

proxy_pass_error_message <%= $proxy_pass_error_message %>;

<% if $protocol == 'imap' { %>
<% if $imap_auth { %>
<%- if $protocol == 'imap' { -%>
<%- if $imap_auth { -%>
imap_auth <%= $imap_auth %>;
<% } %>
<% if $imap_capabilities { %>
<%- } -%>
<%- if $imap_capabilities { -%>
imap_capabilities <%= $imap_capabilities.join(" ") %>;
<% } %>
<% if $imap_client_buffer { %>
<%- } -%>
<%- if $imap_client_buffer { -%>
imap_client_buffer <%= $imap_client_buffer %>;
<% } %>
<%- } %>
<% if $protocol == 'pop3' { %>
<% if $pop3_auth { %>
<%- } -%>
<%- } -%>
<%- if $protocol == 'pop3' { -%>
<%- if $pop3_auth { -%>
pop3_auth <%= $pop3_auth %>;
<% } %>
<% if $pop3_capabilities { %>
<%- } -%>
<%- if $pop3_capabilities { -%>
pop3_capabilities <%= $pop3_capabilities.join(" ") %>;
<% } %>
<%- } %>
<% if $protocol == 'smtp' { %>
<% if $smtp_auth { %>
<%- } -%>
<%- } -%>
<%- if $protocol == 'smtp' { -%>
<%- if $smtp_auth { -%>
smtp_auth <%= $smtp_auth %>;
<% } %>
<% if $smtp_capabilities { %>
<%- } -%>
<%- if $smtp_capabilities { -%>
smtp_capabilities <%= $smtp_capabilities.join(" ") %>;
<% } %>
<%- } %>
<%- } -%>
<%- } -%>
98 changes: 49 additions & 49 deletions templates/mailhost/mailhost_ssl.epp
Original file line number Diff line number Diff line change
Expand Up @@ -16,70 +16,70 @@
| -%>
# MANAGED BY PUPPET
server {
<% if $mailhost_cfg_prepend { %>
<%- $mailhost_cfg_prepend.keys.sort.each |$key| { %>
<%- $value = $mailhost_cfg_prepend[$key] %>
<%- if $value =~ Hash { %>
<%- $value.keys.sort.each |$subkey| { %>
<%- $subvalue = $value[$key] %>
<%- [$subvalue].flatten.each |$asubvalue| { %>
<%- if $mailhost_cfg_prepend { -%>
<%- $mailhost_cfg_prepend.keys.sort.each |$key| { -%>
<%- $value = $mailhost_cfg_prepend[$key] -%>
<%- if $value =~ Hash { -%>
<%- $value.keys.sort.each |$subkey| { -%>
<%- $subvalue = $value[$key] -%>
<%- [$subvalue].flatten.each |$asubvalue| { -%>
<%= $key %> <%= $subkey %> <%= $asubvalue %>;
<%- } %>
<%- } %>
<%- } else { %>
<%- [$value].flatten.each |$asubvalue| { %>
<%- } -%>
<%- } -%>
<%- } else { -%>
<%- [$value].flatten.each |$asubvalue| { -%>
<%= $key %> <%= $asubvalue %>;
<%- } %>
<%- } %>
<%- } %>
<% } %>
<% $raw_prepend.each |$line| { %>
<%- } -%>
<%- } -%>
<%- } -%>
<%- } -%>
<%- $raw_prepend.each |$line| { -%>
<%= $line %>
<% } %>
<%- if $listen_ip =~ Array { %>
<%- $listen_ip.each |$ip| { %>
<%- } -%>
<%- if $listen_ip =~ Array { -%>
<%- $listen_ip.each |$ip| { -%>
listen <%= $ip %>:<%= $ssl_port %><% if versioncmp($nginx_version, '1.15.0') >= 0 { %> ssl<% } %>;
<%- } %>
<%- } else { %>
<%- } -%>
<%- } else { -%>
listen <%= $listen_ip %>:<%= $ssl_port %><% if versioncmp($nginx_version, '1.15.0') >= 0 { %> ssl<% } %>;
<%- } %>
<%- } -%>
<%# check to see if ipv6 support exists in the kernel before applying -%>
<%# FIXME this logic is duplicated all over the place -%>
<%- if $ipv6_enable and $ipaddress6 { %>
<%- if $ipv6_listen_ip =~ Array { %>
<%- $ipv6_listen_ip.each |$ipv6| { %>
<%- if $ipv6_enable and $ipaddress6 { -%>
<%- if $ipv6_listen_ip =~ Array { -%>
<%- $ipv6_listen_ip.each |$ipv6| { -%>
listen [<%= $ipv6 %>]:<%= $ssl_port %> <% if $ipv6_listen_options { %><%= $ipv6_listen_options %><% } %>;
<%- } %>
<%- } else { %>
<%- } -%>
<%- } else { -%>
listen [<%= $ipv6_listen_ip %>]:<%= $ssl_port %> <% if $ipv6_listen_options { %><%= $ipv6_listen_options %><% } %>;
<%- } %>
<%- } %>
<%= $mailhost_common %>
<%- } -%>
<%- } -%>
<%= $mailhost_common -%>

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

<%= $mailhost_ssl_settings %>
<% if $mailhost_cfg_append { %>
<%- $mailhost_cfg_append.keys.sort.each |$key| { %>
<%- $value = $mailhost_cfg_append[$key] %>
<%- if $value =~ Hash { %>
<%- $value.keys.sort.each |$subkey| { %>
<%- $subvalue = $value[$key] %>
<%- [$subvalue].flatten.each |$asubvalue| { %>
<%= $mailhost_ssl_settings -%>
<%- if $mailhost_cfg_append { -%>
<%- $mailhost_cfg_append.keys.sort.each |$key| { -%>
<%- $value = $mailhost_cfg_append[$key] -%>
<%- if $value =~ Hash { -%>
<%- $value.keys.sort.each |$subkey| { -%>
<%- $subvalue = $value[$key] -%>
<%- [$subvalue].flatten.each |$asubvalue| { -%>
<%= $key %> <%= $subkey %> <%= $asubvalue %>;
<%- } %>
<%- } %>
<%- } else { %>
<%- [$value].flatten.each |$asubvalue| { %>
<%- } -%>
<%- } -%>
<%- } else { -%>
<%- [$value].flatten.each |$asubvalue| { -%>
<%= $key %> <%= $asubvalue %>;
<%- } %>
<%- } %>
<%- } %>
<% } %>
<% $raw_append.each |$line| { %>
<%- } -%>
<%- } -%>
<%- } -%>
<%- } -%>
<%- $raw_append.each |$line| { -%>
<%= $line %>
<% } %>
<%- } -%>
}
40 changes: 20 additions & 20 deletions templates/mailhost/mailhost_ssl_settings.epp
Original file line number Diff line number Diff line change
Expand Up @@ -20,37 +20,37 @@
ssl_certificate <%= $ssl_cert %>;
ssl_certificate_key <%= $ssl_key %>;
ssl_ciphers <%= $ssl_ciphers %>;
<% if $ssl_client_cert { %>
<%- if $ssl_client_cert { -%>
ssl_client_certificate <%= $ssl_client_cert %>;
ssl_verify_client on;
<% } %>
<%- if $ssl_verify_depth { %>
<%- } -%>
<%- if $ssl_verify_depth { -%>
ssl_verify_depth <%= $ssl_verify_depth %>;
<%- } %>
<% if $ssl_crl { %>
<%- } -%>
<%- if $ssl_crl { -%>
ssl_crl <%= $ssl_crl %>;
<% } %>
<% if $ssl_dhparam { %>
<%- } -%>
<%- if $ssl_dhparam { -%>
ssl_dhparam <%= $ssl_dhparam %>;
<% } %>
<%- if $ssl_ecdh_curve { %>
<%- } -%>
<%- if $ssl_ecdh_curve { -%>
ssl_ecdh_curve <%= $ssl_ecdh_curve %>;
<%- } %>
<%- if $ssl_password_file { %>
<%- } -%>
<%- if $ssl_password_file { -%>
ssl_password_file <%= $ssl_password_file %>;
<%- } %>
<%- } -%>
ssl_prefer_server_ciphers <%= $ssl_prefer_server_ciphers %>;
ssl_protocols <%= $ssl_protocols %>;
<% if $ssl_session_cache { %>
<%- if $ssl_session_cache { -%>
ssl_session_cache <%= $ssl_session_cache %>;
<% } %>
<%- if $ssl_session_ticket_key { %>
<%- } -%>
<%- if $ssl_session_ticket_key { -%>
ssl_session_ticket_key <%= $ssl_session_ticket_key %>;
<%- } %>
<%- if $ssl_session_tickets { %>
<%- } -%>
<%- if $ssl_session_tickets { -%>
ssl_session_tickets <%= $ssl_session_tickets %>;
<%- } %>
<%- } -%>
ssl_session_timeout <%= $ssl_session_timeout %>;
<%- if $ssl_trusted_cert { %>
<%- if $ssl_trusted_cert { -%>
ssl_trusted_certificate <%= $ssl_trusted_cert %>;
<%- } %>
<%- } -%>

0 comments on commit d6da550

Please sign in to comment.