]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/tile/recipes/default.rb
Whitelist SoTM-US 2014 Hack day tile access
[chef.git] / cookbooks / tile / recipes / default.rb
index e494d630d20d2dec554b06c57ab923e5e03bae9a..d0769d2fd79fc3b007d951a45fe827786c9ea149 100644 (file)
@@ -102,6 +102,10 @@ package "python-cairo"
 package "python-mapnik"
 package "ttf-dejavu"
 package "ttf-unifont"
+package "fonts-droid"
+package "fonts-sipa-arundina"
+package "fonts-sil-padauk"
+package "fonts-khmeros"
 
 directory "/srv/tile.openstreetmap.org/cgi-bin" do
   owner "tile"
@@ -376,18 +380,10 @@ postgresql_munin "gis" do
   database "gis"
 end
 
-tile_uid = node[:etc][:passwd][:"tile"][:uid]
-www_data_gid = node[:etc][:group][:"www-data"][:gid]
-
-ruby_block node[:tile][:node_file] do
-  block do
-    File.chown(tile_uid, www_data_gid, node[:tile][:node_file])
-    File.chmod(0640, node[:tile][:node_file])
-  end
-  not_if do
-    stat = File.stat(node[:tile][:node_file])
-    stat.uid == tile_uid && stat.gid == www_data_gid && stat.mode == 0640
-  end
+file node[:tile][:node_file] do
+  owner "tile"
+  group "www-data"
+  mode 0640
 end
 
 directory "/var/log/tile" do