From: Tom Hughes Date: Wed, 3 Aug 2022 09:39:43 +0000 (+0100) Subject: Merge remote-tracking branch 'github/pull/514' X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/14e316cd3e1ab5f25a54d0765ebad61ac665ccb4?hp=-c Merge remote-tracking branch 'github/pull/514' --- 14e316cd3e1ab5f25a54d0765ebad61ac665ccb4 diff --combined cookbooks/tile/recipes/default.rb index 4de4200bc,b9ae28cf8..e8bef858c --- a/cookbooks/tile/recipes/default.rb +++ b/cookbooks/tile/recipes/default.rb @@@ -29,6 -29,7 +29,7 @@@ include_recipe "ruby include_recipe "tools" blocks = data_bag_item("tile", "blocks") + admins = data_bag_item("apache", "admins") web_passwords = data_bag_item("web", "passwords") apache_module "alias" @@@ -59,6 -60,14 +60,14 @@@ en fastlyips = JSON.parse(IO.read("#{Chef::Config[:file_cache_path]}/fastly-ip-list.json")) + remote_file "#{Chef::Config[:file_cache_path]}/statuscake-locations.json" do + source "https://app.statuscake.com/Workfloor/Locations.php?format=json" + compile_time true + ignore_failure true + end + + statuscakelocations = JSON.parse(IO.read("#{Chef::Config[:file_cache_path]}/statuscake-locations.json")) + apache_site "default" do action :disable end @@@ -69,7 -78,9 +78,9 @@@ en apache_site "tile.openstreetmap.org" do template "apache.erb" - variables :fastly => fastlyips["addresses"] + variables :fastly => fastlyips["addresses"] + fastlyips["ipv6_addresses"], + :statuscake => statuscakelocations.flat_map { |_, v| [v["ip"], v["ipv6"]] }, + :admins => admins["hosts"] end template "/etc/logrotate.d/apache2" do @@@ -665,7 -676,7 +676,7 @@@ en systemd_timer "render-lowzoom" do description "Render low zoom tiles" - on_calendar "Sun *-*~07/1 01:00:00" + on_calendar "Fri *-*-* 23:00:00 UTC" end service "render-lowzoom.timer" do