Update postfix cookbook
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
# encoding: utf-8
|
||||
# Copyright:: 2012-2017, Chef Software, Inc.
|
||||
# Copyright:: 2012-2019, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -15,7 +14,11 @@
|
||||
#
|
||||
|
||||
node['postfix']['maps'].each do |type, maps|
|
||||
if node['platform_family'] == 'debian'
|
||||
if platform_family?('debian')
|
||||
package "postfix-#{type}" if %w(pgsql mysql ldap cdb).include?(type)
|
||||
end
|
||||
|
||||
if platform?('redhat') && node['platform_version'].to_i == 8
|
||||
package "postfix-#{type}" if %w(pgsql mysql ldap cdb).include?(type)
|
||||
end
|
||||
|
||||
@@ -38,9 +41,7 @@ node['postfix']['maps'].each do |type, maps|
|
||||
map: content,
|
||||
separator: separator
|
||||
)
|
||||
if %w(btree cdb dbm hash sdbm).include?(type)
|
||||
notifies :run, "execute[update-postmap-#{file}]"
|
||||
end
|
||||
notifies :run, "execute[update-postmap-#{file}]" if %w(btree cdb dbm hash sdbm).include?(type)
|
||||
notifies :restart, 'service[postfix]'
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user