Use "password" for additional Postgres databases, not "pass"
Being more explicit sounds better.
This commit is contained in:
@ -37,8 +37,8 @@ matrix_postgres_container_postgres_bind_port: ""
|
||||
# matrix_postgres_additional_databases:
|
||||
# - name: matrix_appservice_discord
|
||||
# username: matrix_appservice_discord
|
||||
# pass: some_password
|
||||
# password: some_password
|
||||
# - name: matrix_appservice_slack
|
||||
# username: matrix_appservice_slack
|
||||
# pass: some_password
|
||||
# password: some_password
|
||||
matrix_postgres_additional_databases: []
|
||||
|
@ -6,7 +6,7 @@
|
||||
fail:
|
||||
msg: "Additional database definition ({{ additional_db }} lacks a required key: {{ item }}"
|
||||
when: "item not in additional_db"
|
||||
with_items: "{{ ['name', 'username', 'pass'] }}"
|
||||
with_items: "{{ ['name', 'username', 'password'] }}"
|
||||
|
||||
# The SQL statements that we'll run against Postgres are stored in a file that others can't read.
|
||||
# This file will be mounted into the container and fed to Postgres.
|
||||
|
@ -10,7 +10,7 @@ $$;
|
||||
|
||||
-- This is useful for initial user creation (since we don't assign a password above) and for handling subsequent password changes
|
||||
-- TODO - we should escape quotes in the password.
|
||||
ALTER ROLE {{ additional_db.username }} PASSWORD '{{ additional_db.pass }}';
|
||||
ALTER ROLE {{ additional_db.username }} PASSWORD '{{ additional_db.password }}';
|
||||
|
||||
-- This will generate an error on subsequent execution
|
||||
CREATE DATABASE {{ additional_db.name }} WITH LC_CTYPE 'C' LC_COLLATE 'C' OWNER {{ additional_db.username }};
|
||||
|
Reference in New Issue
Block a user