]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/mailman/recipes/default.rb
Bring mailman configuration under chef with XSRF protection
[chef.git] / cookbooks / mailman / recipes / default.rb
index 4013058bcad0b94068f0c24cba7bd16741607241..8588c5bea425bea94ef2f3fbadf81845a127759b 100644 (file)
 # limitations under the License.
 #
 
-include_recipe "apache"
+require "securerandom"
+
+include_recipe "apache::ssl"
 
 package "mailman"
 
+node.set_unless[:mailman][:subscribe_form_secret] = SecureRandom.base64(48)
+
+template "/etc/mailman/mm_cfg.py" do
+  source "mm_cfg.py.erb"
+  user "root"
+  group "root"
+  mode 0644
+  notifies :restart, "service[mailman]"
+end
+
 service "mailman" do
-  action [ :enable, :start ]
+  action [:enable, :start]
   supports :restart => true, :reload => true
 end