Skip to content

Commit

Permalink
fix: postgresql_cert_name didn't work properly, using this parameter
Browse files Browse the repository at this point in the history
caused an error. Because there was a missing variable __pg_server_crt
definition in the correct context. This commit also enhances the description
of postgresql_cern_name variable.

Related: SYSROLES-157
  • Loading branch information
fila43 committed Oct 13, 2024
1 parent 6e0c8bd commit 77f3d6d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ postgresql_ssl_enable: true
If you want to use your own certificate and private key, use the
`postgresql_cert_name` variable to specify the certificate name. You must keep
both certificate and key files in the same directory and under the same name
with the `.crt` and `.key` suffixes.
with the `.crt` and `.key` suffixes on the managed node. The value should be an
absolute path.


For example, if your certificate file is located in `/etc/certs/server.crt` and
your private key in `/etc/certs/server.key`, set the `postgresql_cert_name`
Expand Down
3 changes: 3 additions & 0 deletions tasks/certificate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@
- __postgresql_cert.stat.exists
- __postgresql_key.stat.exists
- postgresql_certificates | length < 1
vars:
__pg_server_crt: "{{ __postgresql_data_dir }}/server.crt"
__pg_server_key: "{{ __postgresql_data_dir }}/server.key"
block:
- name: Install certificate file
file:
Expand Down

0 comments on commit 77f3d6d

Please sign in to comment.