Skip to content

Commit

Permalink
Update database_configuration.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
TheRealHaoLiu committed Mar 13, 2024
1 parent 1b73100 commit e658838
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions roles/installer/tasks/database_configuration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e658838

Please sign in to comment.