]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/nominatim/recipes/base.rb
Fix issues reported by new rubocop
[chef.git] / cookbooks / nominatim / recipes / base.rb
index 2e6a8c12550cb6d34e6c62e399bba4b2a7c75c1a..8721ef0146e987bf4018cad29cd7b2d10575551f 100644 (file)
@@ -26,6 +26,7 @@ package "php5-pgsql"
 package "php5-fpm"
 package "php-pear"
 package "php-apc"
+package "php-db"
 
 apache_module "rewrite"
 apache_module "proxy"
@@ -91,6 +92,7 @@ package "postgresql-#{database_version}-postgis-#{postgis_version}"
 package "postgresql-server-dev-#{database_version}"
 package "build-essential"
 package "libxml2-dev"
+package "libexpat-dev"
 package "libgeos-dev"
 package "libgeos++-dev"
 package "libpq-dev"
@@ -106,11 +108,6 @@ package "libboost-system-dev"
 package "libboost-filesystem-dev"
 package "libboost-thread-dev"
 
-execute "php-pear-db" do
-  command "pear install DB"
-  not_if { File.exist?("/usr/share/php/DB") }
-end
-
 execute "compile_nominatim" do
   action :nothing
   command "cd #{source_directory} && ./autogen.sh && ./configure && make"
@@ -161,11 +158,11 @@ file "#{source_directory}/settings/ip_blocks.map" do
   mode 0664
 end
 
-if node[:nominatim][:enabled]
-  cron_action = :create
-else
-  cron_action = :delete
-end
+cron_action = if node[:nominatim][:enabled]
+                :create
+              else
+                :delete
+              end
 
 template "/etc/cron.d/nominatim" do
   action cron_action