mirror of
https://github.com/ansible/awx-operator.git
synced 2026-03-26 21:33:14 +00:00
fix: add quotes for PGPASSWORD for the backup and restore roles
This commit is contained in:
@@ -403,7 +403,7 @@ stringData:
|
|||||||
type: Opaque
|
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.
|
> 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.
|
||||||
|
|
||||||
|
|||||||
@@ -99,7 +99,7 @@
|
|||||||
command: |
|
command: |
|
||||||
bash -c """
|
bash -c """
|
||||||
set -e -o pipefail
|
set -e -o pipefail
|
||||||
PGPASSWORD={{ awx_postgres_pass }} {{ pgdump }} > {{ backup_dir }}/tower.db
|
PGPASSWORD='{{ awx_postgres_pass }}' {{ pgdump }} > {{ backup_dir }}/tower.db
|
||||||
echo 'Successful'
|
echo 'Successful'
|
||||||
"""
|
"""
|
||||||
register: data_migration
|
register: data_migration
|
||||||
|
|||||||
@@ -65,7 +65,7 @@
|
|||||||
command: |
|
command: |
|
||||||
bash -c """
|
bash -c """
|
||||||
set -e -o pipefail
|
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'
|
echo 'Successful'
|
||||||
"""
|
"""
|
||||||
no_log: true
|
no_log: true
|
||||||
|
|||||||
@@ -86,7 +86,7 @@
|
|||||||
command: |
|
command: |
|
||||||
bash -c """
|
bash -c """
|
||||||
set -e -o pipefail
|
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'
|
echo 'Successful'
|
||||||
"""
|
"""
|
||||||
register: data_migration
|
register: data_migration
|
||||||
|
|||||||
Reference in New Issue
Block a user