From 24cb6006f67492a69b7e04e44509b23cf0cfef94 Mon Sep 17 00:00:00 2001 From: Ricardo Carrillo Cruz Date: Thu, 24 Apr 2025 09:58:48 +0200 Subject: [PATCH] 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 --- roles/installer/tasks/migrate_data.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roles/installer/tasks/migrate_data.yml b/roles/installer/tasks/migrate_data.yml index 0970e4ee..389501d5 100644 --- a/roles/installer/tasks/migrate_data.yml +++ b/roles/installer/tasks/migrate_data.yml @@ -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' "