]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/exim/recipes/default.rb
Split out default munin plugin installation to a new recipe
[chef.git] / cookbooks / exim / recipes / default.rb
index b250045d2d8fa9ee9a901baf912f08779da76aae..e0fd75de3e84ce9f4f48a38894222aa87d183274 100644 (file)
@@ -17,6 +17,7 @@
 # limitations under the License.
 #
 
+include_recipe "munin"
 include_recipe "networking"
 
 package %w[
@@ -77,7 +78,7 @@ if node[:exim][:smarthost_name]
     relay_from_hosts |= host.ipaddresses(:role => :external)
   end
 
-  domains = node[:exim][:local_domains].reject { |d| ["localhost", "@", "noreply.openstreetmap.org"].any?(d) }
+  domains = node[:exim][:certificate_names].select { |c| c =~ /^a\.mx\./ }.collect { |c| c.sub(/^a\.mx./, "") }
   primary_domain = domains.first
 
   directory "/srv/mta-sts.#{primary_domain}" do
@@ -103,6 +104,7 @@ if node[:exim][:smarthost_name]
 
   apache_site "mta-sts.#{primary_domain}" do
     template "apache-mta-sts.erb"
+    directory "/srv/mta-sts.#{primary_domain}"
     variables :domains => domains
   end
 end