X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/0199f3853369b47e62424ed434665d9f768b2d38..960a6fc6158ab637ee4a5bc0dfd0139e75f542b0:/cookbooks/nominatim/recipes/slave.rb diff --git a/cookbooks/nominatim/recipes/slave.rb b/cookbooks/nominatim/recipes/slave.rb index d7c7889c8..22d1c0bf7 100644 --- a/cookbooks/nominatim/recipes/slave.rb +++ b/cookbooks/nominatim/recipes/slave.rb @@ -17,14 +17,15 @@ # 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"