Rubocop fixes
This commit is contained in:
parent
1f7c62f8dc
commit
770e65103f
19
.rubocop.yml
19
.rubocop.yml
@ -1,12 +1,31 @@
|
|||||||
AllCops:
|
AllCops:
|
||||||
Exclude:
|
Exclude:
|
||||||
- vendor/**/*
|
- vendor/**/*
|
||||||
|
- Guardfile
|
||||||
|
|
||||||
AlignParameters:
|
AlignParameters:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
ClassLength:
|
||||||
|
Enabled: false
|
||||||
|
CyclomaticComplexity:
|
||||||
|
Enabled: false
|
||||||
|
Documentation:
|
||||||
|
Enabled: false
|
||||||
Encoding:
|
Encoding:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
Style/FileName:
|
||||||
|
Enabled: false
|
||||||
LineLength:
|
LineLength:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
MethodLength:
|
MethodLength:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
Metrics/AbcSize:
|
||||||
|
Enabled: false
|
||||||
|
PerceivedComplexity:
|
||||||
|
Enabled: false
|
||||||
|
SingleSpaceBeforeFirstArg:
|
||||||
|
Enabled: false
|
||||||
|
Style/ClassAndModuleChildren:
|
||||||
|
Enabled: false
|
||||||
|
Style/FileName:
|
||||||
|
Enabled: false
|
||||||
|
|||||||
@ -5,6 +5,6 @@ metadata
|
|||||||
group :integration do
|
group :integration do
|
||||||
cookbook 'apt'
|
cookbook 'apt'
|
||||||
cookbook 'yum'
|
cookbook 'yum'
|
||||||
cookbook 'fake', :path => 'test/fixtures/cookbooks/fake'
|
cookbook 'fake', path: 'test/fixtures/cookbooks/fake'
|
||||||
cookbook 'wrapper', :path => 'test/fixtures/cookbooks/wrapper'
|
cookbook 'wrapper', path: 'test/fixtures/cookbooks/wrapper'
|
||||||
end
|
end
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
# Generic cookbook attributes
|
# Generic cookbook attributes
|
||||||
default['postfix']['mail_type'] = 'client'
|
default['postfix']['mail_type'] = 'client'
|
||||||
default['postfix']['relayhost_role'] = 'relayhost'
|
default['postfix']['relayhost_role'] = 'relayhost'
|
||||||
default['postfix']['multi_environment_relay'] = false
|
default['postfix']['multi_environment_relay'] = false
|
||||||
default['postfix']['use_procmail'] = false
|
default['postfix']['use_procmail'] = false
|
||||||
@ -145,4 +145,3 @@ 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"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -57,7 +57,7 @@ when 'omnios'
|
|||||||
# we don't guard this because if the user creation was successful (or happened out of band), then this won't get executed when the action is :nothing.
|
# we don't guard this because if the user creation was successful (or happened out of band), then this won't get executed when the action is :nothing.
|
||||||
execute '/opt/omni/sbin/postfix set-permissions'
|
execute '/opt/omni/sbin/postfix set-permissions'
|
||||||
|
|
||||||
template manifest_path do
|
template manifest_path do
|
||||||
source 'manifest-postfix.xml.erb'
|
source 'manifest-postfix.xml.erb'
|
||||||
owner 'root'
|
owner 'root'
|
||||||
group node['root_group']
|
group node['root_group']
|
||||||
|
|||||||
@ -24,17 +24,11 @@ if node['postfix']['main']['smtp_sasl_auth_enable'] == 'yes'
|
|||||||
include_recipe 'postfix::sasl_auth'
|
include_recipe 'postfix::sasl_auth'
|
||||||
end
|
end
|
||||||
|
|
||||||
if node['postfix']['use_alias_maps']
|
include_recipe 'postfix::aliases' if node['postfix']['use_alias_maps']
|
||||||
include_recipe 'postfix::aliases'
|
|
||||||
end
|
|
||||||
|
|
||||||
if node['postfix']['use_transport_maps']
|
include_recipe 'postfix::transports' if node['postfix']['use_transport_maps']
|
||||||
include_recipe 'postfix::transports'
|
|
||||||
end
|
|
||||||
|
|
||||||
if node['postfix']['use_access_maps']
|
include_recipe 'postfix::access' if node['postfix']['use_access_maps']
|
||||||
include_recipe 'postfix::access'
|
|
||||||
end
|
|
||||||
|
|
||||||
if node['postfix']['use_virtual_aliases']
|
if node['postfix']['use_virtual_aliases']
|
||||||
include_recipe 'postfix::virtual_aliases'
|
include_recipe 'postfix::virtual_aliases'
|
||||||
@ -47,4 +41,3 @@ end
|
|||||||
if node['postfix']['use_relay_restrictions_maps']
|
if node['postfix']['use_relay_restrictions_maps']
|
||||||
include_recipe 'postfix::relay_restrictions'
|
include_recipe 'postfix::relay_restrictions'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -26,4 +26,3 @@ template node['postfix']['relay_restrictions_db'] do
|
|||||||
source 'relay_restrictions.erb'
|
source 'relay_restrictions.erb'
|
||||||
notifies :run, 'execute[update-postfix-relay-restrictions]'
|
notifies :run, 'execute[update-postfix-relay-restrictions]'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -6,13 +6,13 @@ set :path, '/sbin:/usr/local/sbin:$PATH'
|
|||||||
def get_family
|
def get_family
|
||||||
fam = 'solaris2'
|
fam = 'solaris2'
|
||||||
return fam unless File.exist? '/etc/release'
|
return fam unless File.exist? '/etc/release'
|
||||||
File.open("/etc/release") do |file|
|
File.open('/etc/release') do |file|
|
||||||
while line = file.gets
|
while line = file.gets
|
||||||
case line
|
case line
|
||||||
when /^\s*(OmniOS)/
|
when /^\s*(OmniOS)/
|
||||||
fam = 'omnios'
|
fam = 'omnios'
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
fam
|
fam
|
||||||
end
|
end
|
||||||
@ -24,4 +24,3 @@ def postfix_conf_path
|
|||||||
'/etc/postfix'
|
'/etc/postfix'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user