]> git.openstreetmap.org Git - chef.git/blob - roles/db-master.rb
Add jsrouting.apis.dev.openstreetmap.org
[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     :versions => [ "9.1" ],
7     :settings => {
8       :defaults => {
9         :wal_level => "hot_standby",
10         :archive_mode => "on",
11         :archive_command => "/bin/cp %p /store/postgresql/archive/%f",
12         :max_wal_senders => "2",
13         :late_authentication_rules => [
14           { :database => "replication", :user => "replication", :address => "146.179.159.168/32" },
15           { :database => "replication", :user => "replication", :address => "146.179.159.173/32" }
16         ]
17       }
18     }
19   },
20   :rsyncd => {
21     :modules => {
22       :archive => {
23         :comment => "WAL Archive",
24         :path => "/store/postgresql/system/archive",
25         :read_only => true,
26         :write_only => false,
27         :list => false,
28         :uid => "postgres",
29         :gid => "postgres",
30         :transfer_logging => false,
31         :hosts_allow => [
32           "146.179.159.168", "146.179.159.173"
33         ]
34       }
35     }
36   }
37 )
38
39 run_list(
40   "role[db]",
41   "recipe[db::master]",
42   "recipe[rsyncd]"
43 )