]> git.openstreetmap.org Git - chef.git/blob - roles/db-master.rb
a107afa7159e7b8d3c2834baef91199db79c59af
[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         :archive_mode => "on",
9         :archive_command => "/usr/local/bin/openstreetmap-wal-g wal-push %p --walg-prevent-wal-overwrite=true",
10         :max_replication_slots => "1",
11         :late_authentication_rules => [
12           { :database => "replication", :user => "replication", :address => "10.0.0.4/32" },   # snap-02
13           { :database => "replication", :user => "replication", :address => "10.0.0.10/32" },  # eddie
14           { :database => "replication", :user => "replication", :address => "10.0.32.40/32" }, # katla
15           { :database => "replication", :user => "replication", :address => "10.0.48.49/32" }, # snap-01
16           { :database => "replication", :user => "replication", :address => "10.0.48.50/32" }, # karm
17           { :database => "replication", :user => "replication", :address => "10.0.64.50/32" }  # snap-03
18         ]
19       }
20     }
21   }
22 )
23
24 run_list(
25   "role[db]",
26   "recipe[db::master]",
27   "recipe[rsyncd]"
28 )