Resolve rubocop warnings
This commit is contained in:
parent
110c8a00db
commit
10375cf989
@ -121,26 +121,26 @@ end
|
|||||||
default['postfix']['master']['submission'] = false
|
default['postfix']['master']['submission'] = false
|
||||||
|
|
||||||
# OS Aliases
|
# OS Aliases
|
||||||
case node['platform']
|
default['postfix']['aliases'] = case node['platform']
|
||||||
when 'freebsd'
|
when 'freebsd'
|
||||||
default['postfix']['aliases'] = {
|
{
|
||||||
'MAILER-DAEMON' => 'postmaster',
|
'MAILER-DAEMON' => 'postmaster',
|
||||||
'bin' => 'root',
|
'bin' => 'root',
|
||||||
'daemon' => 'root',
|
'daemon' => 'root',
|
||||||
'named' => 'root',
|
'named' => 'root',
|
||||||
'nobody' => 'root',
|
'nobody' => 'root',
|
||||||
'uucp' => 'root',
|
'uucp' => 'root',
|
||||||
'www' => 'root',
|
'www' => 'root',
|
||||||
'ftp-bugs' => 'root',
|
'ftp-bugs' => 'root',
|
||||||
'postfix' => 'root',
|
'postfix' => 'root',
|
||||||
'manager' => 'root',
|
'manager' => 'root',
|
||||||
'dumper' => 'root',
|
'dumper' => 'root',
|
||||||
'operator' => 'root',
|
'operator' => 'root',
|
||||||
'abuse' => 'postmaster'
|
'abuse' => 'postmaster'
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
default['postfix']['aliases'] = {}
|
{}
|
||||||
end
|
end
|
||||||
|
|
||||||
if node['postfix']['use_relay_restirictions_maps']
|
if node['postfix']['use_relay_restirictions_maps']
|
||||||
default['postfix']['main']['smtpd_relay_restrictions'] = "hash:#{node['postfix']['relay_restrictions_db']}, reject"
|
default['postfix']['main']['smtpd_relay_restrictions'] = "hash:#{node['postfix']['relay_restrictions_db']}, reject"
|
||||||
|
@ -20,4 +20,4 @@ recipe 'postfix::server', 'Sets the mail_type attribute to master'
|
|||||||
end
|
end
|
||||||
|
|
||||||
source_url 'https://github.com/chef-cookbooks/postfix' if respond_to?(:issues_url)
|
source_url 'https://github.com/chef-cookbooks/postfix' if respond_to?(:issues_url)
|
||||||
issues_url 'https://github.com/chef-cookbooks/postfix/issues' if respond_to?(:source_url)
|
issues_url 'https://github.com/chef-cookbooks/postfix/issues' if respond_to?(:source_url)
|
||||||
|
@ -20,7 +20,7 @@ execute 'update-postfix-aliases' do
|
|||||||
command 'newaliases'
|
command 'newaliases'
|
||||||
environment PATH: "#{ENV['PATH']}:/opt/omni/bin:/opt/omni/sbin" if platform_family?('omnios')
|
environment PATH: "#{ENV['PATH']}:/opt/omni/bin:/opt/omni/sbin" if platform_family?('omnios')
|
||||||
# On FreeBSD, /usr/sbin/newaliases is the sendmail command, and it's in the path before postfix's /usr/local/bin/newaliases
|
# On FreeBSD, /usr/sbin/newaliases is the sendmail command, and it's in the path before postfix's /usr/local/bin/newaliases
|
||||||
environment ({ 'PATH' => "/usr/local/bin:#{ENV['PATH']}" }) if platform_family?('freebsd')
|
environment ({ 'PATH' => "/usr/local/bin:#{ENV['PATH']}" }) if platform_family?('freebsd') # rubocop: disable Lint/ParenthesesAsGroupedExpression
|
||||||
action :nothing
|
action :nothing
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -29,11 +29,11 @@ case node['platform_family']
|
|||||||
when 'debian'
|
when 'debian'
|
||||||
sasl_pkgs = %w(libsasl2-2 libsasl2-modules ca-certificates)
|
sasl_pkgs = %w(libsasl2-2 libsasl2-modules ca-certificates)
|
||||||
when 'rhel'
|
when 'rhel'
|
||||||
if node['platform_version'].to_i < 6
|
sasl_pkgs = if node['platform_version'].to_i < 6
|
||||||
sasl_pkgs = %w(cyrus-sasl cyrus-sasl-plain openssl)
|
%w(cyrus-sasl cyrus-sasl-plain openssl)
|
||||||
else
|
else
|
||||||
sasl_pkgs = %w(cyrus-sasl cyrus-sasl-plain ca-certificates)
|
%w(cyrus-sasl cyrus-sasl-plain ca-certificates)
|
||||||
end
|
end
|
||||||
when 'fedora'
|
when 'fedora'
|
||||||
sasl_pkgs = %w(cyrus-sasl cyrus-sasl-plain ca-certificates)
|
sasl_pkgs = %w(cyrus-sasl cyrus-sasl-plain ca-certificates)
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user