From 1b731008f0c40c9907ff31635fb00d7bc3827895 Mon Sep 17 00:00:00 2001 From: Hao Liu <44379968+TheRealHaoLiu@users.noreply.github.com> Date: Wed, 13 Mar 2024 15:45:33 -0400 Subject: [PATCH] Update database_configuration.yml --- roles/installer/tasks/database_configuration.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/roles/installer/tasks/database_configuration.yml b/roles/installer/tasks/database_configuration.yml index ee2d952e1..116517355 100644 --- a/roles/installer/tasks/database_configuration.yml +++ b/roles/installer/tasks/database_configuration.yml @@ -166,7 +166,11 @@ pod: "{{ old_postgres_pod['metadata']['name'] }}" command: | bash -c """ - cat {{ path_to_pg_version }} + if [ -f {{ path_to_pg_version }} ]; then + cat {{ path_to_pg_version }} + elif [ -f '/var/lib/postgresql/data/pgdata/PG_VERSION' ]; then + cat '/var/lib/postgresql/data/pgdata/PG_VERSION' + fi """ register: _old_pg_version