From: Tom Hughes Date: Sun, 6 Oct 2013 17:50:58 +0000 (+0100) Subject: Allow some mail aliases to be placed in a data bag X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/8ea4e1fa9dbc556bfbcd7352c61cbd872ff96f84?ds=sidebyside Allow some mail aliases to be placed in a data bag --- diff --git a/cookbooks/exim/recipes/default.rb b/cookbooks/exim/recipes/default.rb index 7c9dc6887..b5b15080c 100644 --- a/cookbooks/exim/recipes/default.rb +++ b/cookbooks/exim/recipes/default.rb @@ -72,6 +72,14 @@ search(:accounts, "*:*").each do |account| end end +if node[:exim][:private_aliases] + aliases = data_bag_item("exim", "aliases") + + aliases[node[:exim][:private_aliases]].each do |name,address| + node.default[:exim][:aliases][name] = address + end +end + template "/etc/aliases" do source "aliases.erb" owner "root"