]> git.openstreetmap.org Git - chef.git/commitdiff
Allow some mail aliases to be placed in a data bag
authorTom Hughes <tom@compton.nu>
Sun, 6 Oct 2013 17:50:58 +0000 (18:50 +0100)
committerTom Hughes <tom@compton.nu>
Sun, 6 Oct 2013 17:50:58 +0000 (18:50 +0100)
cookbooks/exim/recipes/default.rb

index 7c9dc6887886f9f2589cb4f3fdef8184da2a2f1a..b5b15080c0a15c615fc6aba0366389c9480a45ea 100644 (file)
@@ -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"