Do not run service restart for solaris
Signed-off-by: Jaymala Sinha <jsinha@chef.io>
This commit is contained in:
parent
518f982af3
commit
797e19dae9
@ -67,7 +67,7 @@ when 'omnios'
|
|||||||
execute 'load postfix manifest' do
|
execute 'load postfix manifest' do
|
||||||
action :nothing
|
action :nothing
|
||||||
command "svccfg import #{manifest_path}"
|
command "svccfg import #{manifest_path}"
|
||||||
notifies :restart, 'service[postfix]'
|
notifies :restart, 'service[postfix]' unless platform_family?('solaris2')
|
||||||
end
|
end
|
||||||
when 'freebsd'
|
when 'freebsd'
|
||||||
# Actions are based on docs provided by FreeBSD:
|
# Actions are based on docs provided by FreeBSD:
|
||||||
@ -80,7 +80,7 @@ when 'freebsd'
|
|||||||
source 'mailer.erb'
|
source 'mailer.erb'
|
||||||
owner 'root'
|
owner 'root'
|
||||||
group 0
|
group 0
|
||||||
notifies :restart, 'service[postfix]'
|
notifies :restart, 'service[postfix]' unless platform_family?('solaris2')
|
||||||
end
|
end
|
||||||
|
|
||||||
execute 'switch_mailer_to_postfix' do
|
execute 'switch_mailer_to_postfix' do
|
||||||
@ -175,7 +175,10 @@ end
|
|||||||
owner 'root'
|
owner 'root'
|
||||||
group node['root_group']
|
group node['root_group']
|
||||||
mode '0644'
|
mode '0644'
|
||||||
notifies :restart, 'service[postfix]'
|
# restart service for solaris on chef-client has a bug
|
||||||
|
# unless condition can be removed after
|
||||||
|
# https://github.com/chef/chef/pull/6596 merge/release
|
||||||
|
notifies :restart, 'service[postfix]' unless platform_family?('solaris2')
|
||||||
variables(
|
variables(
|
||||||
lazy { { settings: node['postfix'][cfg] } }
|
lazy { { settings: node['postfix'][cfg] } }
|
||||||
)
|
)
|
||||||
@ -185,5 +188,5 @@ end
|
|||||||
|
|
||||||
service 'postfix' do
|
service 'postfix' do
|
||||||
supports status: true, restart: true, reload: true
|
supports status: true, restart: true, reload: true
|
||||||
action :enable
|
action [:enable, :start]
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user