Rename PostgreSQL SSL config variables
e.g. s/sslmode/ssl_mode/g to conform with borgmatic naming conventions.
This commit is contained in:
parent
33113890f5
commit
a16fed8887
2 changed files with 14 additions and 14 deletions
|
@ -556,7 +556,7 @@ map:
|
||||||
documentation for details. Note that format is
|
documentation for details. Note that format is
|
||||||
ignored when the database name is "all".
|
ignored when the database name is "all".
|
||||||
example: directory
|
example: directory
|
||||||
sslmode:
|
ssl_mode:
|
||||||
type: str
|
type: str
|
||||||
enum: ['disable', 'allow', 'prefer', 'require', 'verify-ca', 'verify-full']
|
enum: ['disable', 'allow', 'prefer', 'require', 'verify-ca', 'verify-full']
|
||||||
desc: |
|
desc: |
|
||||||
|
@ -564,22 +564,22 @@ map:
|
||||||
"require", "verify-ca" or "verify-full". Defaults to "disable". See
|
"require", "verify-ca" or "verify-full". Defaults to "disable". See
|
||||||
https://www.postgresql.org/docs/current/libpq-ssl.html for details.
|
https://www.postgresql.org/docs/current/libpq-ssl.html for details.
|
||||||
example: disable
|
example: disable
|
||||||
sslcert:
|
ssl_cert:
|
||||||
type: str
|
type: str
|
||||||
desc: |
|
desc: |
|
||||||
Path to a client certificate.
|
Path to a client certificate.
|
||||||
example: "/root/.postgresql/postgresql.crt"
|
example: "/root/.postgresql/postgresql.crt"
|
||||||
sslkey:
|
ssl_key:
|
||||||
type: str
|
type: str
|
||||||
desc: |
|
desc: |
|
||||||
Path to a private client key.
|
Path to a private client key.
|
||||||
example: "/root/.postgresql/postgresql.key"
|
example: "/root/.postgresql/postgresql.key"
|
||||||
sslrootcert:
|
ssl_root_cert:
|
||||||
type: str
|
type: str
|
||||||
desc: |
|
desc: |
|
||||||
Path to a root certificate containing a list of trusted certificate authorities.
|
Path to a root certificate containing a list of trusted certificate authorities.
|
||||||
example: "/root/.postgresql/root.crt"
|
example: "/root/.postgresql/root.crt"
|
||||||
sslcrl:
|
ssl_crl:
|
||||||
type: str
|
type: str
|
||||||
desc: |
|
desc: |
|
||||||
Path to a certificate revocation list.
|
Path to a certificate revocation list.
|
||||||
|
|
|
@ -22,15 +22,15 @@ def make_extra_environment(database):
|
||||||
extra = dict()
|
extra = dict()
|
||||||
if 'password' in database:
|
if 'password' in database:
|
||||||
extra['PGPASSWORD'] = database['password']
|
extra['PGPASSWORD'] = database['password']
|
||||||
extra['PGSSLMODE'] = database.get('sslmode', 'disable')
|
extra['PGSSLMODE'] = database.get('ssl_mode', 'disable')
|
||||||
if 'sslcert' in database:
|
if 'ssl_cert' in database:
|
||||||
extra['PGSSLCERT'] = database['sslcert']
|
extra['PGSSLCERT'] = database['ssl_cert']
|
||||||
if 'sslkey' in database:
|
if 'ssl_key' in database:
|
||||||
extra['PGSSLKEY'] = database['sslkey']
|
extra['PGSSLKEY'] = database['ssl_key']
|
||||||
if 'sslrootcert' in database:
|
if 'ssl_root_cert' in database:
|
||||||
extra['PGSSLROOTCERT'] = database['sslrootcert']
|
extra['PGSSLROOTCERT'] = database['ssl_root_cert']
|
||||||
if 'sslcrl' in database:
|
if 'ssl_crl' in database:
|
||||||
extra['PGSSLCRL'] = database['sslcrl']
|
extra['PGSSLCRL'] = database['ssl_crl']
|
||||||
return extra
|
return extra
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue