Skip to content

Commit

Permalink
#319 allow configurable Postgres authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
Don Sizemore committed Sep 13, 2023
1 parent c06a7b0 commit b7c827d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ build_guides: false
db:
postgres:
enabled: true
auth: scram-sha-256
adminpass: DVn33dsth1s
name: dvndb
host: localhost
Expand Down
6 changes: 3 additions & 3 deletions templates/pg_hba.conf.j2
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# "local" is for Unix domain socket connections only
local all all trust
local all all {{ db.postgres.auth }}
# IPv4 local connections:
host all all 127.0.0.1/32 password
host all all 127.0.0.1/32 {{ db.postgres.auth }}
# IPv6 local connections:
host all all ::1/128 password
host all all ::1/128 {{ db.postgres.auth }}

# replication and dataverse access from other servers
{% if db.postgres.replication.enabled is defined %}
Expand Down
1 change: 1 addition & 0 deletions tests/group_vars/jenkins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ db:
postgres:
enabled: true
adminpass: DVn33dsth1s
auth: scram-sha-256
name: dvndb
host: localhost
user: dvnuser
Expand Down
1 change: 1 addition & 0 deletions tests/group_vars/memorytests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ db:
postgres:
enabled: true
adminpass: DVn33dsth1s
auth: scram-sha-256
name: dvndb
host: localhost
user: dvnuser
Expand Down
1 change: 1 addition & 0 deletions tests/group_vars/vagrant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ build_guides: false
db:
postgres:
enabled: true
auth: trust
adminpass: DVn33dsth1s
name: vagrantdb
host: localhost
Expand Down

0 comments on commit b7c827d

Please sign in to comment.