Skip to content

Commit

Permalink
hba_host_type
Browse files Browse the repository at this point in the history
  • Loading branch information
vitabaks authored Dec 26, 2024
1 parent adf6dbe commit 9c554f6
Showing 1 changed file with 6 additions and 28 deletions.
34 changes: 6 additions & 28 deletions automation/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -344,35 +344,13 @@ postgresql_pg_hba:
- { type: "local", database: "all", user: "all", address: "", method: "{{ postgresql_password_encryption_algorithm }}" }
- { type: "host", database: "all", user: "all", address: "127.0.0.1/32", method: "{{ postgresql_password_encryption_algorithm }}" }
- { type: "host", database: "all", user: "all", address: "::1/128", method: "{{ postgresql_password_encryption_algorithm }}" }
- type: >-
{% if tls_cert_generate | bool %}hostssl
{% else %}host
{% endif %}
database: "all"
user: "all"
address: "0.0.0.0/0"
method: "{{ postgresql_password_encryption_algorithm }}"
# - type: >-
# {% if tls_cert_generate | bool %}hostssl
# {% else %}host
# {% endif %}
# database: "mydatabase"
# user: "mydb-user"
# address: "192.168.0.0/24"
# method: "{{ postgresql_password_encryption_algorithm }}"

# - type: >-
# {% if tls_cert_generate | bool %}hostssl
# {% else %}host
# {% endif %}
# database: "all"
# user: "all"
# address: "192.168.0.0/24"
# method: "ident"
# options: "map=main" # use pg_ident
# list of lines that Patroni will use to generate pg_ident.conf
- { type: "{{ hba_host_type }}", database: "all", user: "all", address: "0.0.0.0/0", method: "{{ postgresql_password_encryption_algorithm }}" }
# - { type: "{{ hba_host_type }}", database: "mydatabase", user: "mydb-user", address: "192.168.0.0/24", method: "{{ postgresql_password_encryption_algorithm }}" }

Check failure on line 348 in automation/vars/main.yml

View workflow job for this annotation

GitHub Actions / build

yaml[line-length]

Line too long (164 > 160 characters)

Check failure on line 348 in automation/vars/main.yml

View workflow job for this annotation

GitHub Actions / build

348:161 [line-length] line too long (164 > 160 characters)
# - { type: "{{ hba_host_type }}", database: "all", user: "all", address: "192.168.0.0/24", method: "ident", options: "map=main" } # use pg_ident

hba_host_type: "{{ 'hostssl' if tls_cert_generate | bool else 'host' }}"

# list of lines that Patroni will use to generate pg_ident.conf
postgresql_pg_ident: []
# - { mapname: "main", system_username: "postgres", pg_username: "backup" }
# - { mapname: "", system_username: "", pg_username: "" }
Expand Down

0 comments on commit 9c554f6

Please sign in to comment.