]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/tilecache/recipes/default.rb
Fix fail2ban servie
[chef.git] / cookbooks / tilecache / recipes / default.rb
index 5c4907b69c7805b98c78452a4f8c8fcb37cddeb8..4afda5568d3b0b1d3bbea6ac9b0071bd75d5d4a9 100644 (file)
@@ -1,8 +1,8 @@
 #
-# Cookbook Name:: tilecache
+# Cookbook:: tilecache
 # Recipe:: default
 #
-# Copyright 2011, OpenStreetMap Foundation
+# Copyright:: 2011, OpenStreetMap Foundation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -22,6 +22,7 @@ require "ipaddr"
 include_recipe "ssl"
 include_recipe "squid"
 include_recipe "nginx"
+include_recipe "fail2ban"
 
 package "apache2" do
   action :remove
@@ -135,6 +136,10 @@ template "/etc/logrotate.d/nginx" do
   mode 0o644
 end
 
+fail2ban_jail "squid" do
+  maxretry 1000
+end
+
 tilerenders.each do |render|
   munin_plugin "ping_#{render[:fqdn]}" do
     target "ping_"