Resolve rubocop warnings
This commit is contained in:
parent
110c8a00db
commit
10375cf989
@ -121,26 +121,26 @@ end
|
||||
default['postfix']['master']['submission'] = false
|
||||
|
||||
# OS Aliases
|
||||
case node['platform']
|
||||
when 'freebsd'
|
||||
default['postfix']['aliases'] = {
|
||||
'MAILER-DAEMON' => 'postmaster',
|
||||
'bin' => 'root',
|
||||
'daemon' => 'root',
|
||||
'named' => 'root',
|
||||
'nobody' => 'root',
|
||||
'uucp' => 'root',
|
||||
'www' => 'root',
|
||||
'ftp-bugs' => 'root',
|
||||
'postfix' => 'root',
|
||||
'manager' => 'root',
|
||||
'dumper' => 'root',
|
||||
'operator' => 'root',
|
||||
'abuse' => 'postmaster'
|
||||
}
|
||||
else
|
||||
default['postfix']['aliases'] = {}
|
||||
end
|
||||
default['postfix']['aliases'] = case node['platform']
|
||||
when 'freebsd'
|
||||
{
|
||||
'MAILER-DAEMON' => 'postmaster',
|
||||
'bin' => 'root',
|
||||
'daemon' => 'root',
|
||||
'named' => 'root',
|
||||
'nobody' => 'root',
|
||||
'uucp' => 'root',
|
||||
'www' => 'root',
|
||||
'ftp-bugs' => 'root',
|
||||
'postfix' => 'root',
|
||||
'manager' => 'root',
|
||||
'dumper' => 'root',
|
||||
'operator' => 'root',
|
||||
'abuse' => 'postmaster'
|
||||
}
|
||||
else
|
||||
{}
|
||||
end
|
||||
|
||||
if node['postfix']['use_relay_restirictions_maps']
|
||||
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
|
||||
|
||||
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'
|
||||
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
|
||||
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
|
||||
end
|
||||
|
||||
|
@ -29,11 +29,11 @@ case node['platform_family']
|
||||
when 'debian'
|
||||
sasl_pkgs = %w(libsasl2-2 libsasl2-modules ca-certificates)
|
||||
when 'rhel'
|
||||
if node['platform_version'].to_i < 6
|
||||
sasl_pkgs = %w(cyrus-sasl cyrus-sasl-plain openssl)
|
||||
else
|
||||
sasl_pkgs = %w(cyrus-sasl cyrus-sasl-plain ca-certificates)
|
||||
end
|
||||
sasl_pkgs = if node['platform_version'].to_i < 6
|
||||
%w(cyrus-sasl cyrus-sasl-plain openssl)
|
||||
else
|
||||
%w(cyrus-sasl cyrus-sasl-plain ca-certificates)
|
||||
end
|
||||
when 'fedora'
|
||||
sasl_pkgs = %w(cyrus-sasl cyrus-sasl-plain ca-certificates)
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user