From f9240b99c64c0539bd09be5fd7ceff2578098c6e Mon Sep 17 00:00:00 2001 From: Hao Liu <44379968+TheRealHaoLiu@users.noreply.github.com> Date: Wed, 13 Mar 2024 15:49:13 -0400 Subject: [PATCH] Update database_configuration.yml --- roles/installer/tasks/database_configuration.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/roles/installer/tasks/database_configuration.yml b/roles/installer/tasks/database_configuration.yml index 116517355..8165a1fb8 100644 --- a/roles/installer/tasks/database_configuration.yml +++ b/roles/installer/tasks/database_configuration.yml @@ -156,18 +156,14 @@ - name: Check if postgres pod is running an older version block: - - name: Set path to PG_VERSION file for given container image - set_fact: - path_to_pg_version: '{{ postgres_data_path }}/PG_VERSION' - - name: Get old PostgreSQL version k8s_exec: namespace: "{{ ansible_operator_meta.namespace }}" pod: "{{ old_postgres_pod['metadata']['name'] }}" command: | bash -c """ - if [ -f {{ path_to_pg_version }} ]; then - cat {{ path_to_pg_version }} + if [ -f "{{ postgres_data_path }}/PG_VERSION" ]; then + cat "{{ postgres_data_path }}/PG_VERSION" elif [ -f '/var/lib/postgresql/data/pgdata/PG_VERSION' ]; then cat '/var/lib/postgresql/data/pgdata/PG_VERSION' fi