Skip to content

Commit e5567b7

Browse files
committed
Improve example and READE for certificate usage to be synced with
current functionality
1 parent d305976 commit e5567b7

File tree

2 files changed

+7
-16
lines changed

2 files changed

+7
-16
lines changed

README.md

+4-13
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,12 @@ To set up ssl connection it's necessary to set up `postgresql_ssl_enable` variab
5656
postgresql_ssl_enable: true
5757
```
5858
### postgresql_cert_name
59+
In case you want to use own key and certificate. Use `postgresql_cert_name` variable. It's necessary to have both files in the same directory and with the same name with suffixes .crt and .key
60+
5961
To specify certificate name use `postgresql_cert_name` variable.
60-
You can copy your certificate to `/etc/pki/tls/certs/server.crt` and key to `/etc/pki/tls/private/server.key` or
61-
you can also use certificate system role. For more detail see [`examples/`](examples).
62-
```yaml
63-
postgresql_cert_name: server
64-
```
65-
### postgresql_key_path
66-
Optionaly you can specify path to server key using `postgresql_key_path` variable. The default value is
62+
For example your crt file is located in `/etc/certs/server.crt` and key in `/etc/certs/server.key`. So `postgresql_cert_name` value should be
6763
```yaml
68-
postgresql_key_path: /etc/pki/tls/private
69-
```
70-
### postgresql_cert_path
71-
Optionaly you can specify path to server cert using `postgresql_cert_path` variable. The default value is
72-
```ymal
73-
postgresql_cert_path: "/etc/pki/tls/certs"
64+
postgresql_cert_name: /etc/certs/server
7465
```
7566
### postgresql_certificates
7667
This is a `list` of `dict` in the same format as used

examples/certificate.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
user: all
1010
auth_method: md5
1111
address: '127.0.0.1/32'
12-
postgresql_ssl_enable: true
13-
certificate_requests:
12+
postgresql_ssl_enable: yes
13+
postgresql_certificates:
1414
- name: server
1515
dns: www.example.com
1616
ca: self-sign
17+
1718
roles:
18-
- linux-system-roles.certificate
1919
- linux-system-roles.postgresql

0 commit comments

Comments
 (0)