Skip to content

Commit 9e5fd38

Browse files
authored
Merge pull request #1456 from SimonHoenscheid/unique_pg_hba_defaults
unique pg_hba roles for postgres instances
2 parents 5a32462 + 2c1dc3f commit 9e5fd38

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

manifests/server/instance/config.pp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,40 +86,40 @@
8686
}
8787

8888
postgresql::server::pg_hba_rule {
89-
'local access as postgres user':
89+
"local access as postgres user for instance ${name}":
9090
type => 'local',
9191
user => $user,
9292
auth_method => 'ident',
9393
auth_option => $local_auth_option,
9494
order => 1;
9595

96-
'local access to database with same name':
96+
"local access to database with same name for instance ${name}":
9797
type => 'local',
9898
auth_method => 'ident',
9999
auth_option => $local_auth_option,
100100
order => 2;
101101

102-
'allow localhost TCP access to postgresql user':
102+
"allow localhost TCP access to postgresql user for instance ${name}":
103103
type => 'host',
104104
user => $user,
105105
address => '127.0.0.1/32',
106106
auth_method => 'md5',
107107
order => 3;
108108

109-
'deny access to postgresql user':
109+
"deny access to postgresql user for instance ${name}":
110110
type => 'host',
111111
user => $user,
112112
address => $ip_mask_deny_postgres_user,
113113
auth_method => 'reject',
114114
order => 4;
115115

116-
'allow access to all users':
116+
"allow access to all users for instance ${name}":
117117
type => 'host',
118118
address => $ip_mask_allow_all_users,
119119
auth_method => 'md5',
120120
order => 100;
121121

122-
'allow access to ipv6 localhost':
122+
"allow access to ipv6 localhost for instance ${name}":
123123
type => 'host',
124124
address => '::1/128',
125125
auth_method => 'md5',

spec/classes/server/config_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ class { 'postgresql::server':
173173
end
174174

175175
it 'has hba rule default' do
176-
expect(subject).to contain_postgresql__server__pg_hba_rule('local access as postgres user')
176+
expect(subject).to contain_postgresql__server__pg_hba_rule('local access as postgres user for instance main')
177177
end
178178

179179
it 'has hba rule ipv4acls' do

0 commit comments

Comments
 (0)