Fix foodcritic warning
[chef.git] / 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