]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/taginfo/recipes/default.rb
Fix some foodcritic complaints
[chef.git] / cookbooks / taginfo / recipes / default.rb
index f1d5bb86934906e8ca18a2b3042b885ced64d196..0416e2e5b7e9cb76de0dc0442e86c85f55339837 100644 (file)
@@ -145,40 +145,12 @@ node[:taginfo][:sites].each do |site|
     notifies :restart, "service[apache2]"
   end
 
-  directory "#{directory}/taginfo/web/tmp" do
-    owner "taginfo"
-    group "taginfo"
-    mode 0755
-  end
-
-  directory "#{directory}/data" do
-    owner "taginfo"
-    group "taginfo"
-    mode 0755
-  end
-
-  directory "#{directory}/data/old" do
-    owner "taginfo"
-    group "taginfo"
-    mode 0755
-  end
-
-  directory "#{directory}/download" do
-    owner "taginfo"
-    group "taginfo"
-    mode 0755
-  end
-
-  directory "#{directory}/sources" do
-    owner "taginfo"
-    group "taginfo"
-    mode 0755
-  end
-
-  directory "#{directory}/planet" do
-    owner "taginfo"
-    group "taginfo"
-    mode 0755
+  %w(taginfo/web/tmp bin data data/old download sources planet planet/log planet/replication).each do |dir|
+    directory "#{directory}/#{dir}" do
+      owner "taginfo"
+      group "taginfo"
+      mode 0755
+    end
   end
 
   remote_file "#{directory}/planet/planet.pbf" do
@@ -189,18 +161,6 @@ node[:taginfo][:sites].each do |site|
     mode 0644
   end
 
-  directory "#{directory}/planet/log" do
-    owner "taginfo"
-    group "taginfo"
-    mode 0755
-  end
-
-  directory "#{directory}/planet/replication" do
-    owner "taginfo"
-    group "taginfo"
-    mode 0755
-  end
-
   template "#{directory}/planet/replication/configuration.txt" do
     source "configuration.txt.erb"
     owner "taginfo"
@@ -214,12 +174,6 @@ node[:taginfo][:sites].each do |site|
     mode 0644
   end
 
-  directory "#{directory}/bin" do
-    owner "taginfo"
-    group "taginfo"
-    mode 0755
-  end
-
   template "#{directory}/bin/update-planet" do
     source "update-planet.erb"
     owner "taginfo"