Fix foodcritic warning
authorTom Hughes <tom@compton.nu>
Mon, 15 Jun 2015 20:10:56 +0000 (21:10 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 15 Jun 2015 20:10:56 +0000 (21:10 +0100)
cookbooks/nominatim/recipes/default.rb

index c65c208aab66e55d9ea7d7cca1b3ea0bc6267e08..14b1852b5ff2535b3d6c859228e3546287049dd2 100644 (file)
@@ -278,10 +278,9 @@ directory File.dirname(node[:nominatim][:flatnode_file]) do
   recursive true
 end
 
-if node[:postgresql][:settings][:defaults][:archive_mode] == "on"
-  directory "/data/postgresql-archive" do
-    owner "postgres"
-    group "postgres"
-    mode 0700
-  end
+directory "/data/postgresql-archive" do
+  owner "postgres"
+  group "postgres"
+  mode 0700
+  only_if { node[:postgresql][:settings][:defaults][:archive_mode] == "on" }
 end