]> git.openstreetmap.org Git - chef.git/blob - roles/db-master.rb
19f9d55d95bf2f3732dac5a06b6a79f32e9bcefe
[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 => "hot_standby",
9         :archive_mode => "on",
10         :archive_command => "/usr/local/bin/openstreetmap-wal-e --terse wal-push %p",
11         :max_wal_senders => "3",
12         :late_authentication_rules => [
13           { :database => "replication", :user => "replication", :address => "10.0.48.50/32" },
14           { :database => "replication", :user => "replication", :address => "10.0.48.5/32" },
15           { :database => "replication", :user => "replication", :address => "10.0.0.10/32" },
16           { :database => "replication", :user => "replication", :address => "10.0.32.40/32" }
17         ]
18       }
19     }
20   }
21 )
22
23 run_list(
24   "role[db]",
25   "recipe[db::master]",
26   "recipe[rsyncd]"
27 )