Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Correct manage setting 'password_encryption' for PostgreSQL 10 and
above.
  • Loading branch information
MemberIT committed Dec 18, 2019
commit 2021b9f76f5518e8c2a1591edcb56baf0d19cbc1
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ postgresql_ssl_cert_file: "/etc/ssl/certs/ssl-cert-snakeoil.pem" # (>= 9.2)
postgresql_ssl_key_file: "/etc/ssl/private/ssl-cert-snakeoil.key" # (>= 9.2)
postgresql_ssl_ca_file: "" # (>= 9.2)
postgresql_ssl_crl_file: "" # (>= 9.2)
postgresql_password_encryption: on
postgresql_password_encryption: "{{ 'md5' if postgresql_version is version_compare('10', '>=') else 'on' }}"
postgresql_db_user_namespace: off
postgresql_row_security: off # (>= 9.5)

Expand Down
2 changes: 1 addition & 1 deletion templates/postgresql.conf-10.j2
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ ssl_cert_file = '{{postgresql_ssl_cert_file}}' # (change requires restart)
ssl_key_file = '{{postgresql_ssl_key_file}}' # (change requires restart)
ssl_ca_file = '{{postgresql_ssl_ca_file}}' # (change requires restart)
ssl_crl_file = '{{postgresql_ssl_crl_file}}' # (change requires restart)
password_encryption = {{'on' if postgresql_password_encryption else 'off'}} # md5 or scram-sha-256
password_encryption = {{ 'md5' if postgresql_password_encryption != 'scram-sha-256' else 'scram-sha-256' }} # md5 or scram-sha-256
db_user_namespace = {{'on' if postgresql_db_user_namespace else 'off'}}
row_security = {{'on' if postgresql_row_security else 'off'}}

Expand Down
2 changes: 1 addition & 1 deletion templates/postgresql.conf-11.j2
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ tcp_keepalives_count = {{ postgresql_tcp_keepalives_count }} # TCP_KEEPCNT;
# - Authentication -

authentication_timeout = {{ postgresql_authentication_timeout }} # 1s-600s
password_encryption = {{ 'on' if postgresql_password_encryption else 'off' }} # md5 or scram-sha-256
password_encryption = {{ 'md5' if postgresql_password_encryption != 'scram-sha-256' else 'scram-sha-256' }} # md5 or scram-sha-256
db_user_namespace = {{ 'on' if postgresql_db_user_namespace else 'off' }}

# GSSAPI using Kerberos
Expand Down
2 changes: 1 addition & 1 deletion templates/postgresql.conf-12.j2
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ tcp_user_timeout = {{ postgresql_tcp_user_timeout }} # TCP_USE
# - Authentication -

authentication_timeout = {{ postgresql_authentication_timeout }} # 1s-600s
password_encryption = {{ 'on' if postgresql_password_encryption else 'off' }} # md5 or scram-sha-256
password_encryption = {{ 'md5' if postgresql_password_encryption != 'scram-sha-256' else 'scram-sha-256' }} # md5 or scram-sha-256
db_user_namespace = {{ 'on' if postgresql_db_user_namespace else 'off' }}

# GSSAPI using Kerberos
Expand Down