fix: add quotes for PGPASSWORD for the backup and restore roles

This commit is contained in:
kurokobo
2022-03-20 16:13:12 +09:00
parent 6b873b05ab
commit 589a3751e1
4 changed files with 4 additions and 4 deletions

View File

@@ -403,7 +403,7 @@ stringData:
type: Opaque
```
> Please ensure that the value for the variable "password" is wrapped in quotes if the password contains any special characters.
> Please ensure that the value for the variable `password` should _not_ contain single or double quotes (`'`, `"`) or backslashes (`\`) to avoid any issues during deployment, backup or restoration.
> It is possible to set a specific username, password, port, or database, but still have the database managed by the operator. In this case, when creating the postgres-configuration secret, the `type: managed` field should be added.

View File

@@ -99,7 +99,7 @@
command: |
bash -c """
set -e -o pipefail
PGPASSWORD={{ awx_postgres_pass }} {{ pgdump }} > {{ backup_dir }}/tower.db
PGPASSWORD='{{ awx_postgres_pass }}' {{ pgdump }} > {{ backup_dir }}/tower.db
echo 'Successful'
"""
register: data_migration

View File

@@ -65,7 +65,7 @@
command: |
bash -c """
set -e -o pipefail
PGPASSWORD={{ awx_old_postgres_pass }} {{ pgdump }} | PGPASSWORD={{ awx_postgres_pass }} {{ pg_restore }}
PGPASSWORD='{{ awx_old_postgres_pass }}' {{ pgdump }} | PGPASSWORD='{{ awx_postgres_pass }}' {{ pg_restore }}
echo 'Successful'
"""
no_log: true

View File

@@ -86,7 +86,7 @@
command: |
bash -c """
set -e -o pipefail
cat {{ backup_dir }}/tower.db | PGPASSWORD={{ awx_postgres_pass }} {{ pg_restore }}
cat {{ backup_dir }}/tower.db | PGPASSWORD='{{ awx_postgres_pass }}' {{ pg_restore }}
echo 'Successful'
"""
register: data_migration