From 0b26f676710ab7cc7eb1dc34ae097696f11dbf10 Mon Sep 17 00:00:00 2001 From: aknochow Date: Tue, 17 Sep 2024 17:47:47 -0400 Subject: [PATCH] fix postgres user permissions for upgrades --- roles/installer/tasks/upgrade_postgres.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roles/installer/tasks/upgrade_postgres.yml b/roles/installer/tasks/upgrade_postgres.yml index f8f7a7658..ecf2225b8 100644 --- a/roles/installer/tasks/upgrade_postgres.yml +++ b/roles/installer/tasks/upgrade_postgres.yml @@ -118,7 +118,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=\"$POSTGRES_PASSWORD\" {{ pgdump }} | PGPASSWORD=\"$POSTGRES_PASSWORD\" {{ pg_restore }} + psql -c 'REVOKE postgres FROM {{ awx_postgres_user }}' set +e +o pipefail echo 'Successful' "