]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/tilecache/recipes/default.rb
Rework certificate handling
[chef.git] / cookbooks / tilecache / recipes / default.rb
index 18aa14e145fc771fa638575ba199f8b01a233a5a..d1486adcf4be06f69bfd92f1f145ae4209a3f811 100644 (file)
@@ -17,6 +17,9 @@
 # limitations under the License.
 #
 
+node.default[:ssl][:certificate] = node[:ssl][:certificate] | [ "tile.openstreetmap" ]
+
+include_recipe "ssl"
 include_recipe "squid"
 
 tilecaches = search(:node, "roles:tilecache").sort_by { |n| n[:hostname] }
@@ -25,6 +28,7 @@ tilecaches.each do |cache|
   cache.ipaddresses(:family => :inet, :role => :external).sort.each do |address|
     firewall_rule "accept-squid" do
       action :accept
+      family "inet"
       source "net:#{address}"
       dest "fw"
       proto "tcp:syn"
@@ -33,6 +37,7 @@ tilecaches.each do |cache|
     end
     firewall_rule "accept-squid-icp" do
       action :accept
+      family "inet"
       source "net:#{address}"
       dest "fw"
       proto "udp"
@@ -46,3 +51,11 @@ squid_fragment "tilecache" do
   template "squid.conf.erb"
   variables :caches => tilecaches
 end
+
+template "/etc/logrotate.d/squid" do
+  source "logrotate.squid.erb"
+  owner "root"
+  group "root"
+  mode 0644
+end
+