]> git.openstreetmap.org Git - chef.git/commitdiff
Allow replication connections to slave databases
authorTom Hughes <tom@compton.nu>
Wed, 25 Jan 2023 18:34:08 +0000 (18:34 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 25 Jan 2023 18:34:08 +0000 (18:34 +0000)
roles/db-master.rb
roles/db.rb

index b7bbdd369c499588580932ee4c2b5f90581e61ce..0bb92773968997b11b2b771a6e3b284bf484e145 100644 (file)
@@ -7,14 +7,7 @@ default_attributes(
       :defaults => {
         :archive_mode => "on",
         :archive_command => "/usr/local/bin/openstreetmap-wal-g wal-push %p --walg-prevent-wal-overwrite=true",
-        :max_replication_slots => "1",
-        :late_authentication_rules => [
-          { :database => "replication", :user => "replication", :address => "10.0.0.4/32" },   # snap-02
-          { :database => "replication", :user => "replication", :address => "10.0.0.10/32" },  # eddie
-          { :database => "replication", :user => "replication", :address => "10.0.48.49/32" }, # snap-01
-          { :database => "replication", :user => "replication", :address => "10.0.48.50/32" }, # karm
-          { :database => "replication", :user => "replication", :address => "10.0.64.50/32" }  # snap-03
-        ]
+        :max_replication_slots => "1"
       }
     }
   }
index ff308c8e58eb60f1ce7ad68cd6f403c6217fe785..f0cbe0f97d6d5eec634ad56ca60f90a4e55b2695 100644 (file)
@@ -50,7 +50,12 @@ default_attributes(
         :log_min_duration_statement => "1000",
         :late_authentication_rules => [
           { :address => "10.0.48.0/20" }, # amsterdam
-          { :address => "10.0.64.0/20" }  # dublin
+          { :address => "10.0.64.0/20" }, # dublin
+          { :database => "replication", :user => "replication", :address => "10.0.0.4/32" },   # snap-02
+          { :database => "replication", :user => "replication", :address => "10.0.0.10/32" },  # eddie
+          { :database => "replication", :user => "replication", :address => "10.0.48.49/32" }, # snap-01
+          { :database => "replication", :user => "replication", :address => "10.0.48.50/32" }, # karm
+          { :database => "replication", :user => "replication", :address => "10.0.64.50/32" }  # snap-03
         ]
       }
     }