]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/nominatim/recipes/slave.rb
nominatim: fix directory name
[chef.git] / cookbooks / nominatim / recipes / slave.rb
index d7c7889c8cb240f7dddcd50b3878f4b906f951bd..22d1c0bf7450b534f103a7a68e9f33c107bc017b 100644 (file)
 # limitations under the License.
 #
 
-include_recipe "nominatim::base"
+master = search(:node, "roles:nominatim-master")[0] # ~FC010
+host = master[:nominatim][:master_host]
 
-home_directory = data_bag_item("accounts", "nominatim")["home"]
+node.default[:postgresql][:settings][:defaults][:primary_conninfo] = {
+  :host => host,
+  :port => "5432",
+  :user => "replication",
+  :passwords => { :bag => "nominatim", :item => "passwords" }
+}
 
-git "#{home_directory}/nominatim" do
-  repository node[:nominatim][:repository]
-  enable_submodules true
-  user "nominatim"
-  group "nominatim"
-  notifies :run, "execute[compile_nominatim]"
-end
+node.default[:postgresql][:settings][:defaults][:restore_command] =
+  "/usr/bin/rsync #{host}::archive/%f %p"