@@ -16,12 +16,12 @@ patroni_superuser_username: "postgres"
1616patroni_superuser_password : " " # Please specify a password. If not defined, will be generated automatically during deployment.
1717patroni_superuser_auth_options :
1818 - { option: "sslmode", value: "{{ 'require' if tls_cert_generate | bool else 'disable' }}" } # or 'verify-ca', 'verify-full'
19- - { option: "sslrootcert", value: "{{ tls_dir }}/{{ tls_ca_cert }}" } # or 'system'
19+ - { option: "sslrootcert", value: "{{ tls_dir ~ '/' ~ tls_ca_cert if tls_cert_generate | bool else '' }}" } # or 'system'
2020patroni_replication_username : " replicator"
2121patroni_replication_password : " " # Please specify a password. If not defined, will be generated automatically during deployment.
2222patroni_replication_auth_options :
2323 - { option: "sslmode", value: "{{ 'require' if tls_cert_generate | bool else 'disable' }}" } # or 'verify-ca', 'verify-full'
24- - { option: "sslrootcert", value: "{{ tls_dir }}/{{ tls_ca_cert }}" } # or 'system'
24+ - { option: "sslrootcert", value: "{{ tls_dir ~ '/' ~ tls_ca_cert if tls_cert_generate | bool else '' }}" } # or 'system'
2525# Note: if sslmode: verify-full, and your certificate doesn't have IP address in the SAN,
2626# set also the option postgresql_connect_addr to ensure TLS certificate validation is successful.
2727
@@ -508,9 +508,9 @@ pgbouncer_pools:
508508# ###########################################################
509509
510510patroni_restapi_protocol : " {{ 'https' if tls_cert_generate | bool else 'http' }}"
511- patroni_restapi_certfile : " {{ tls_dir }}/{{ tls_cert }}"
512- patroni_restapi_keyfile : " {{ tls_dir }}/{{ tls_privatekey }}"
513- patroni_restapi_cafile : " {{ tls_dir }}/{{ tls_ca_cert }}"
511+ patroni_restapi_certfile : " {{ tls_dir ~ '/' ~ tls_cert if patroni_restapi_protocol == 'https' else omit }}"
512+ patroni_restapi_keyfile : " {{ tls_dir ~ '/' ~ tls_privatekey if patroni_restapi_protocol == 'https' else omit }}"
513+ patroni_restapi_cafile : " {{ tls_dir ~ '/' ~ tls_ca_cert if patroni_restapi_protocol == 'https' else omit }}"
514514# patroni_restapi_connect_addr: "{{ ansible_hostname }}" # or 'ansible_fqdn'. Set if you need connection to be established by domain name, not IP.
515515patroni_restapi_listen_addr : " 0.0.0.0" # Listen on all interfaces. Or use "{{ bind_address }}" to listen on a specific IP address.
516516patroni_restapi_port : 8008
0 commit comments