]> git.openstreetmap.org Git - chef.git/blob - roles/db-master.rb
Enable overwrite protection for WAL archiving
[chef.git] / roles / db-master.rb
1 name "db-master"
2 description "Role applied to all the master database server"
3
4 default_attributes(
5   :postgresql => {
6     :settings => {
7       :defaults => {
8         :wal_level => "logical",
9         :archive_mode => "on",
10         :archive_command => "/usr/local/bin/openstreetmap-wal-g wal-push %p --walg-prevent-wal-overwrite=true",
11         :max_wal_senders => "10",
12         :max_replication_slots => "1",
13         :late_authentication_rules => [
14           { :database => "replication", :user => "replication", :address => "10.0.0.4/32" },   # snap-02
15           { :database => "replication", :user => "replication", :address => "10.0.0.10/32" },  # eddie
16           { :database => "replication", :user => "replication", :address => "10.0.32.40/32" }, # katla
17           { :database => "replication", :user => "replication", :address => "10.0.48.5/32" },  # ramoth
18           { :database => "replication", :user => "replication", :address => "10.0.48.49/32" }, # snap-01
19           { :database => "replication", :user => "replication", :address => "10.0.48.50/32" }, # karm
20           { :database => "replication", :user => "replication", :address => "10.0.64.50/32" }  # snap-03
21         ]
22       }
23     }
24   }
25 )
26
27 run_list(
28   "role[db]",
29   "recipe[db::master]",
30   "recipe[rsyncd]"
31 )