From: Tom Hughes Date: Sun, 9 Feb 2014 10:23:32 +0000 (+0000) Subject: Simplify management of nodes file permission now CHEF#1260 is fixed X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/c1f8c12f959968e3e110b2f9768bf0950686e83e Simplify management of nodes file permission now CHEF#1260 is fixed --- diff --git a/cookbooks/tile/recipes/default.rb b/cookbooks/tile/recipes/default.rb index e494d630d..6b3e7b9c9 100644 --- a/cookbooks/tile/recipes/default.rb +++ b/cookbooks/tile/recipes/default.rb @@ -376,18 +376,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