Skip to content

Commit

Permalink
Handle scenario where upgrade status is not defined & correct pg tag
Browse files Browse the repository at this point in the history
  • Loading branch information
rooftopcellist committed Aug 29, 2023
1 parent f97a9bf commit 2ab1d26
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion roles/backup/vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
deployment_type: "awx"
_postgres_image: quay.io/sclorg/postgresql-15-c9s
_postgres_image_version: 15
_postgres_image_version: latest
backup_complete: false
database_type: "unmanaged"
supported_pg_version: 15
Expand Down
3 changes: 2 additions & 1 deletion roles/installer/tasks/database_configuration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@
- _old_pg_version.stdout | default('0') | trim < supported_pg_version
when:
- managed_database
- this_awx['resources'][0]['status']['upgradedPostgresVersion'] | default('none') < supported_pg_version
- "'upgradedPostgresVersion' is in this_awx['resources'][0]['status']"
- (this_awx['resources'][0]['status']['upgradedPostgresVersion'] | default(false)) | ternary (this_awx['resources'][0]['status']['upgradedPostgresVersion'] < supported_pg_version, false)
- old_postgres_pod['resources'] | length # upgrade is complete and old pg pod has been removed

- block:
Expand Down
2 changes: 1 addition & 1 deletion roles/restore/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

deployment_type: "awx"
_postgres_image: quay.io/sclorg/postgresql-15-c9s
_postgres_image_version: 15
_postgres_image_version: latest

backup_api_version: '{{ deployment_type }}.ansible.com/v1beta1'
backup_kind: 'AWXBackup'
Expand Down

0 comments on commit 2ab1d26

Please sign in to comment.