From 00c8c9a986aecd78979ec7c98303fbc6f169014d Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 3 Dec 2013 09:55:43 +0000 Subject: [PATCH] Move backup authentication rules to the db-backup role --- roles/db-backup.rb | 14 ++++++++++++++ roles/db-master.rb | 8 -------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/roles/db-backup.rb b/roles/db-backup.rb index 6fab59d23..f713c8058 100644 --- a/roles/db-backup.rb +++ b/roles/db-backup.rb @@ -6,6 +6,20 @@ default_attributes( :users => { :osmbackup => { :status => :role } } + }, + :postgresql => { + :settings => { + :defaults => { + :user_name_maps => { + :backup => [ + { :system => "osmbackup", :postgres => "backup" } + ] + }, + :early_authentication_rules => [ + { :type => "local", :database => "all", :user => "backup", :method => "peer", :options => { :map => "backup" } } + ] + } + } } ) diff --git a/roles/db-master.rb b/roles/db-master.rb index 79c8f0724..a341c6576 100644 --- a/roles/db-master.rb +++ b/roles/db-master.rb @@ -10,14 +10,6 @@ default_attributes( :archive_mode => "on", :archive_command => "/bin/cp %p /store/postgresql/archive/%f", :max_wal_senders => "2", - :user_name_maps => { - :backup => [ - { :system => "osmbackup", :postgres => "backup" } - ] - }, - :early_authentication_rules => [ - { :type => "local", :database => "all", :user => "backup", :method => "peer", :options => { :map => "backup" } } - ], :late_authentication_rules => [ { :database => "replication", :user => "replication", :address => "146.179.159.168/32" }, { :database => "replication", :user => "replication", :address => "146.179.159.173/32" } -- 2.39.5