-
-
Notifications
You must be signed in to change notification settings - Fork 559
Open
Description
π» Brief Description
It is perfectly fine have more mappings per mapname, ref.
The current implementation doesn't allow repetitions of mapnames in
pg_ident.conf
.
π₯ Cookbook version
Version 12.1.0
π©βπ³ Chef-Infra Version
Version 18.6.2
π© Platform details
Debian 11/12
Steps To Reproduce
Steps to reproduce the behavior:
postgresql_ident 'someuser to postgres mapping' do
map_name 'someuser_postgres'
system_username 'someuser'
database_username 'postgres'
action :create
notifies :reload, 'postgresql_service[postgresql]', :delayed
end
# Make sure that the postgres keeps its own identity
# Without this, the cookbook will fail to run
postgresql_ident 'postgres to postgres mapping' do
map_name 'someuser_postgres'
system_username 'postgres'
database_username 'postgres'
action :create
notifies :reload, 'postgresql_service[postgresql]', :delayed
end
π Expected behavior
I would expect a pg_ident.conf
to look like:
#
# Generated by Chef for ident-17-debian-12.vagrantup.com
# Do NOT modify this file by hand.
#
# MAPNAME SYSTEM-USERNAME PG-USERNAME
someuser_postgres postgres postgres
someuser_postgres someuser postgres
but because the mapname's are the same, only one line is written. for example:
#
# Generated by Chef for ident-17-debian-12.vagrantup.com
# Do NOT modify this file by hand.
#
# MAPNAME SYSTEM-USERNAME PG-USERNAME
someuser_postgres postgres postgres
Copilot
Metadata
Metadata
Assignees
Labels
No labels