Added RedHat/CentOS support to postfix cookbook
Signed-off-by: jtimberman <joshua@opscode.com>
This commit is contained in:
@@ -22,8 +22,24 @@ package "postfix" do
|
||||
action :install
|
||||
end
|
||||
|
||||
service "postfix" do
|
||||
action :enable
|
||||
case node[:platform]
|
||||
when "ubuntu", "debian"
|
||||
service "postfix" do
|
||||
action :enable
|
||||
end
|
||||
when "redhat", "centos"
|
||||
service "postfix" do
|
||||
action :nothing
|
||||
end
|
||||
service "sendmail" do
|
||||
action :nothing
|
||||
end
|
||||
execute "switch_mailer_to_postfix" do
|
||||
command "/usr/sbin/alternatives --set mta /usr/sbin/sendmail.postfix"
|
||||
notifies :stop, resources(:service => "sendmail")
|
||||
notifies :start, resources(:service => "postfix")
|
||||
not_if "/usr/bin/test /etc/alternatives/mta -ef /usr/sbin/sendmail.postfix"
|
||||
end
|
||||
end
|
||||
|
||||
%w{main master}.each do |cfg|
|
||||
|
||||
Reference in New Issue
Block a user