Grant postgres to awx user on migrate_data (#2038)

This is needed in case customers move to
operator platform.

Fixes https://issues.redhat.com/browse/AAP-41592
This commit is contained in:
Ricardo Carrillo Cruz
2025-04-24 09:58:48 +02:00
committed by GitHub
parent 4c05137fb8
commit 24cb6006f6

View File

@@ -77,7 +77,9 @@
trap 'end_keepalive \"$keepalive_file\" \"$keepalive_pid\"' EXIT SIGINT SIGTERM
echo keepalive_pid: $keepalive_pid
set -e -o pipefail
psql -c 'GRANT postgres TO {{ awx_postgres_user }}'
PGPASSWORD=\"$PGPASSWORD_OLD\" {{ pgdump }} | PGPASSWORD=\"$POSTGRES_PASSWORD\" {{ pg_restore }}
psql -c 'REVOKE postgres FROM {{ awx_postgres_user }}'
set +e +o pipefail
echo 'Successful'
"