From: Tom Hughes Date: Tue, 21 Sep 2021 10:56:18 +0000 (+0100) Subject: Allow read access for www-data to support the export script X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/3aa08a6743ad88e1987012778b7b29ca89a07ba1 Allow read access for www-data to support the export script --- diff --git a/cookbooks/tile/recipes/default.rb b/cookbooks/tile/recipes/default.rb index f11c8dc24..f2bfd6a7b 100644 --- a/cookbooks/tile/recipes/default.rb +++ b/cookbooks/tile/recipes/default.rb @@ -409,6 +409,10 @@ postgresql_user "tile" do cluster node[:tile][:database][:cluster] end +postgresql_user "www-data" do + cluster node[:tile][:database][:cluster] +end + postgresql_user "_renderd" do cluster node[:tile][:database][:cluster] end @@ -443,7 +447,7 @@ end cluster node[:tile][:database][:cluster] database "gis" owner "tile" - permissions "tile" => :all, "_renderd" => :select + permissions "tile" => :all, "www-data" => :select, "_renderd" => :select end end @@ -461,6 +465,15 @@ if node[:tile][:database][:external_data_script] group "tile" ignore_failure true end + + Array(node[:tile][:database][:external_data_tables]).each do |table| + postgresql_table table do + cluster node[:tile][:database][:cluster] + database "gis" + owner "tile" + permissions "tile" => :all, "www-data" => :select, "_renderd" => :select + end + end end postgresql_munin "gis" do