X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/d5112ae724a15255983df81f9fda474c05925deb..090fe909149f22d158c859a7d4a9edfb523df2fb:/cookbooks/tilecache/recipes/default.rb?ds=sidebyside diff --git a/cookbooks/tilecache/recipes/default.rb b/cookbooks/tilecache/recipes/default.rb index c275edb66..994c6104a 100644 --- a/cookbooks/tilecache/recipes/default.rb +++ b/cookbooks/tilecache/recipes/default.rb @@ -27,8 +27,10 @@ package "apache2" do action :remove end -package "xz-utils" -package "openssl" +package %w[ + xz-utils + openssl +] # oathtool for QoS token package "oathtool" @@ -86,10 +88,6 @@ nginx_site "default" do action [:delete] end -resolvers = node[:networking][:nameservers].map do |resolver| - IPAddr.new(resolver).ipv6? ? "[#{resolver}]" : resolver -end - template "/usr/local/bin/nginx_generate_tilecache_qos_map" do source "nginx_generate_tilecache_qos_map.erb" owner "root" @@ -116,13 +114,12 @@ ssl_certificate "tile.openstreetmap.org" do "a.tile.openstreetmap.org", "b.tile.openstreetmap.org", "c.tile.openstreetmap.org"] - fallback_certificate "tile.openstreetmap" notifies :restart, "service[nginx]" end nginx_site "tile-ssl" do template "nginx_tile_ssl.conf.erb" - variables :resolvers => resolvers, :caches => tilecaches + variables :caches => tilecaches end template "/etc/logrotate.d/nginx" do @@ -139,3 +136,7 @@ tilerenders.each do |render| conf_variables :host => render[:fqdn] end end + +Dir.glob("/var/log/nginx/access.log*") do |log| + File.unlink(log) +end